(SOLVED) Temporary Events Don't Trigger Permanent Actions?

Discussion and feedback on Construct 2

Post » Sun Sep 11, 2016 12:33 am

I have an event that fires only when a variable is less than another variable.
That event triggers an action that changes another variable.
When the event stops firing, the variable it was affecting reverts back.
I want the variable to stay permanently when it's changed.

Do you know what I'm doing wrong?

I noticed events that don't have the green arrow(a physical trigger, not a check every tick) do this.
Last edited by dfernfield on Mon Sep 12, 2016 10:06 pm, edited 1 time in total.
B
18
S
8
G
5
Posts: 14
Reputation: 3,830

Post » Sun Sep 11, 2016 1:24 am

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Sep 11, 2016 2:41 am

If you have an event that's like "var1 > var2", this event will keep happen every tick when var1 > var2.

The green arrow means that the event is a trigger, so it indeed does trigger only once, but you if you have one in a sub-event like this:

var1 is less than var2
|- trigger event

Since var1 is less than var2, the trigger will keep occurring every tick also.

If you want to check if var2 is less than var1 and then only trigger it once, you have to use the system event "trigger once while true". So it would look like this:

var1 is less than var2
trigger only once - do action
B
123
S
43
G
41
Posts: 847
Reputation: 28,206

Post » Mon Sep 12, 2016 10:06 pm

andreyin wrote:If you have an event that's like "var1 > var2", this event will keep happen every tick when var1 > var2.

The green arrow means that the event is a trigger, so it indeed does trigger only once, but you if you have one in a sub-event like this:

var1 is less than var2
|- trigger event

Since var1 is less than var2, the trigger will keep occurring every tick also.

If you want to check if var2 is less than var1 and then only trigger it once, you have to use the system event "trigger once while true". So it would look like this:

var1 is less than var2
trigger only once - do action


Thank you all problems fixed. :D This actually also helped me answer my other question at: viewtopic.php?f=147&t=181659
B
18
S
8
G
5
Posts: 14
Reputation: 3,830


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests