How can I detect if a variable was changing?

Get help using Construct 2

Post » Tue Jun 14, 2016 7:01 pm

Hello,

In the construct 2 have any specific code/option which simple detect/notice if a variable change?

Details:

I have a "player_orientation" variable which change according to player movement direction. (0-left,1-right-2up-3down)
I need it for a lot of reason and it's working fine, but I got problem now and I need this "changing detector staff" if it exist for this.

Thanks!
B
5
S
1
Posts: 37
Reputation: 441

Post » Tue Jun 14, 2016 8:18 pm

How about player_orientation <> -1
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Tue Jun 14, 2016 8:29 pm

If the variable is always either 0-1-2-or 3 then just use the System condition compare variable value to see what it is at anytime.

If you need to know what the original value was then save it in another variable and then compare the two.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 635
Reputation: 9,331

Post » Tue Jun 14, 2016 8:46 pm

If you mean ... if variable has changed AND the condition is true ... then just combine it with a 'trigger once while true'.

If you just want to know if some variable changed ... then this is (i think) the way.

https://www.dropbox.com/s/svolpjjmm1hmc ... .capx?dl=0
B
33
S
18
G
27
Posts: 2,431
Reputation: 20,326


Return to How do I....?

Who is online

Users browsing this forum: luck1210, R0J0hound and 3 guests