add value when moving

Get help using Construct 2

Post » Tue May 21, 2013 3:30 pm

Hello,
How I can make that:
when moving(8 dir movement) then add 1 to Var
else -1 to var

I can't use "set to" because I wan't to manipulate the Var by other actions.

The thing what I wan't to do is to notice when started moving and then add 1 to Var, when stopped substract 1 from Var.

Thanks for reply.
B
9
S
2
G
1
Posts: 21
Reputation: 992

Post » Tue May 21, 2013 3:43 pm

try using compare speed
B
39
S
10
G
7
Posts: 514
Reputation: 9,426

Post » Tue May 21, 2013 8:13 pm

why not add or subtract the value at the control level?

right button pressed add 1 to var

left button pressed -1 from var?

As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Wed May 22, 2013 3:49 am

The 8-direction behavior has an "Is Moving" action. Have one event:

- 8-Direction Is Moving
- Trigger Once While True
-> Add To var 1

And another:

- 8-Direction Is NOT Moving (Right click the condition and do Invert)
- Trigger Once While True
-> Subtract From var 1EncryptedCow2013-05-22 03:50:24
B
40
S
12
G
7
Posts: 603
Reputation: 7,656


Return to How do I....?

Who is online

Users browsing this forum: armaldio, ETgirl79, Yahoo [Bot] and 21 guests