How do I use an if statement inside a loop

Get help using Construct 2

Post » Thu Mar 09, 2017 6:09 am

Hi everyone.

This is my problem...
I'm new using construct 2 and I'm stuck.

Image

After the wait finish, I need to know the value in "linea_movimiento" in that moment and then, move the "player" depending on that value (1 right, 2 left, 3 up, 4 down)...

I'm trying to do something like this:

________________________________
if(linea_movimiento==1)
player.move(right)

if(linea_movimiento==2)
player.move(left)
... etc...
_________________________________

Thanks.
B
8
Posts: 5
Reputation: 310

Post » Thu Mar 09, 2017 6:19 am

Add another subevent to check that variable

On linea_movimiento = 2:
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,825

Post » Thu Mar 09, 2017 9:02 am

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, worm1, Yahoo [Bot] and 20 guests