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
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Thu Mar 09, 2017 9:02 am

Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896


Return to How do I....?

Who is online

Users browsing this forum: Cub3D, David181, yiuyiu6666 and 28 guests