Every Tick conflict?

Get help using Construct 2

Post » Mon Oct 05, 2015 11:32 pm

Does having multiple every tick events conflict with anything? if i want things to fire in a certain order, and have 2 every tick events will that cause problems? I am having weird things happen in my game =/
B
10
S
4
G
3
Posts: 223
Reputation: 3,458

Post » Mon Oct 05, 2015 11:44 pm

The way I understand it, is code on a sub-branch will fire at the same time. At least that is how it happens in my experience.

Every Tic
> Do X
> Do Y
> Do Z

XYZ fire at the same frame.

Every Tic
> Do X
>> Do Y
> Do Z

XZ fire at the same time, then Y goes after X is done.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Mon Oct 05, 2015 11:50 pm

"Does having multiple every tick events conflict with anything?"
No, they are just run in the order they are placed in the event sheet.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Tue Oct 06, 2015 1:00 am

Wait, explain sub events again plz, because i have an event, it changes a variable, in that same event i have sub events depending on the if of the variable. am I doing it wrong?

The reason being is, in my game you die and respawn, and have ai that respawn as well, but it is saying '''respawning''' when I am already respawned, when ai allies are respawning.
B
10
S
4
G
3
Posts: 223
Reputation: 3,458

Post » Tue Oct 06, 2015 1:41 am

If you have it like this:

Top Event
>Variable = 0 => Set Variable =1
>Variable = 1 => Set Variable =0

The final result is that Variable=0

Because the second event is true since it follows the first. They all occur in the same frame, but the order is preserved so the first event fires and set Variable to 1 followed by the next.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614


Return to How do I....?

Who is online

Users browsing this forum: amazingdream, lordsas, mekonbekon and 52 guests