Changing motion of same instance

Get help using Construct 2

Post » Sun Jul 08, 2012 3:55 am

Hi guys, i have an instance with a variable called direction, so that ingame i can put the same instance, change direction var, so that the motion is different. When i make event -collision with wall, change dir,
the problem is that not every instance change its direction i dont know why.

Heres the capx: Construct 2 project, made with Release 98, hosted on Dropbox.
B
24
S
3
G
1
Posts: 20
Reputation: 2,510

Post » Sun Jul 08, 2012 2:38 pm

It works when the enemy is travelling left or down. The problem is that event 6 undoes event 5 and 8 undoes 7. When the enemy is traveling right and collides with a wall then event 5 is true and the enemy's direction is set to "LEFT" and then event 6 is true and sets it back to "RIGHT".

There are various ways you could fix it.
enemyChangeDir.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Sun Jul 08, 2012 5:13 pm

Thanks!! , didn't thought that
B
24
S
3
G
1
Posts: 20
Reputation: 2,510


Return to How do I....?

Who is online

Users browsing this forum: zatyka and 22 guests