Trigger conditions

Discussion and feedback on Construct 2

Post » Fri May 29, 2015 7:08 pm

Hi guys, would like to hear your thoughts about some trigger condition technicalities.

Image

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 :)
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Sun May 31, 2015 6:44 am

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.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest