Sequence of operations

Discussion and feedback on Construct 2

Post » Mon Aug 03, 2015 9:34 pm

Could you help me to understand how Construct2 manage the sequence of operations. I don't understand why after I destroyed the sprite, the count is still 1 during the Start of Layout sequence and is 0 after I refreshed it Every Tick.


Image
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Mon Aug 03, 2015 9:38 pm

Its not destroyed until the end of the event.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Mon Aug 03, 2015 9:42 pm

Creation and destruction of instance happens effectively the next tick after the action to create/destroy it was encountered.
This topic may give further informations.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Mon Aug 03, 2015 11:14 pm

Thanks, it works:
Image
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Thu Aug 06, 2015 1:20 pm

Sequencing was a big pain in the ass to figure out for me. But in the end, I settled on running steps of sequence from bottom up, and every time step ends I change value of the variable.

Example:
Var =4
only set var to 1
Var =3
- do stuff, set var to 4
Var=2
- do stuff, set var to 3
Var=1
- do stuff, set var to 2
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099


Return to Construct 2 General

Who is online

Users browsing this forum: bobcgausa and 4 guests