Jump to content
SquishyPoon

Editor questions about game logic objects

Recommended Posts

Hi, i am working on a map in the editor and i made a puzzle with 12 switch and i want it to  run the action,  perform action with an entity once 4 of the switch are on.but right now all i can think of perform the action if any switch is on or the last  switch does it.  any tips regarding game logic objects is also welcome.thanks for the great game

Share this post


Link to post
Share on other sites

Hi,

I think that you can use Label game logic for it.

1) Make Label "SwitchOn"

2) On swithing switch perform Change Entity Labels action and add to the switched switch Label "SwitchOn"

3) Add new Event listener. Change "Listen for" to "Labeled entities count changed", select "SwitchOn" label and event Count is equal 4.

Hope this helps.

Share this post


Link to post
Share on other sites

here is what i did 

1)i created a label and added the 4 switch i want to use to open the door.5a32b937bb1bf_label1.thumb.jpg.0110448fa461eb9e322efc1fe87dc62e.jpg

2) i created an event listener here is what it looks like and i think this is where i did something wrong.5a32bb9e196f9_eventlistener1.thumb.jpg.65a4f14db5568279450911ac6bb635d4.jpg

 

3) i created a 2nd event listener this is what i did. (its not connected to event listener 1)5a32bcfcee805_Eventlistener2.thumb.jpg.666275574e34e8b6bacb4701d066e25f.jpg

 

here is a screenshot of the whole thingPuzzle.thumb.jpg.d953983ead1a0bd4ba068bd1c4413727.jpg

still dosent work

Thanks for taking time to look at this and any help you provide.

Edited by SquishyPoon

Share this post


Link to post
Share on other sites

Hi, tested this setup:

foverview.PNG

flabel.PNG

 

fonswitchon.PNG

4 x for each lever.

fonswitchoff.PNG

4x for each lever

4switcheson.PNG

Hope this helps

  • Thanks 1
  • Upvote 1

Share this post


Link to post
Share on other sites

Hi,Thank you, those 5 screenshot helped me a lot not only it works but it also made me learn a lot about the game Logic label and Listener.

2 thumbs up for Houp for taking some time to help me.

  • Upvote 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×