Trigger conditions

0 favourites
  • 2 posts
  • Hi guys, would like to hear your thoughts about some trigger condition technicalities.

    In above example 2 trigger conditions are evaluated on 1 user action (mouse click). It should be a pretty typical example. If Sprite2 is over Sprite, we dont want to register a click on Sprite. But contrary to std. event sheet execution, objects are destroyed immediately, and the sub event in line 4 becomes true. So, the easy way to resolve the issue in this example, would be to just move line 3 below line 4.

    However in projects of considerable size with 100s to 1000s of events, it seems messy and difficult to keep track on the sequence in which trigger conditions can occur. I wonder why trigger conditions caused by the same trigger, is not handled like events in a tick? For instance handling object destructions after trigger condition stack. Maybe I'm missing some obvious reasons for handling triggers this way. Any thoughts or insight?

    I thought about this for a rather huge project. The cleanest solution I could come up with, was a wait for signal before actions in problematic triggered events. And then, end every tick with a signal. But it still bugs me

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • if I understand you correctly, it seems like you have the right approach. if you're concerned about this same scenario having to be written multiple times for multiple sprites, perhaps you should consider using families. of course it's hard to say without understanding the full scope of your game.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)