Can I Make My Character Switch Y Axis Smoothly?

Get help using Construct 2

Post » Wed Apr 09, 2014 10:11 pm

@Kyatric
Im trying to figure out how to make my enemy switch its Y axis similar to How the Y axis of the enemies in this clip are.
Ive marked it at the exact time where the action starts. https://www.youtube.com/watch?v=xb9P0YTeq5Y#t=43

Im just trying to make the enemy move to my players Y axis before he actually starts to move forward and attack if that makes sense.think you could give me a hand.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Thu Apr 10, 2014 12:55 am

If you give the enemy an attack range variable, you can proceed as follows...

enemy distance(enemy.x,enemy.y,player.x,player.y) is less than a distance you specify, set an attack variable to 1
else set attack to 0

then enemy attack is greater than 0, set enemy y to player y

You could set them to randomly walk towards player by having them set angle to player only when a certain animation frame is played...

enemy is on screen, attack =0
animation frame =2 set enemy movement to player x,player y this will set the enemy edging towards the player...
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 » Fri Apr 11, 2014 1:04 am

Try this Rookie, https://db.tt/gkpg449g The actual movement they use is more complex than this of course but should get you started.
ImageImage
B
114
S
23
G
7
Posts: 1,068
Reputation: 12,845


Return to How do I....?

Who is online

Users browsing this forum: alextro, ivanski1983 and 12 guests