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
29
S
4
G
1
Posts: 23
Reputation: 2,791

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
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Sun Jul 08, 2012 5:13 pm

Thanks!! , didn't thought that
B
29
S
4
G
1
Posts: 23
Reputation: 2,791


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests