How do I Move a Sprite and Not Rotate

Get help using Construct 2

Post » Fri Sep 02, 2016 7:38 am

Hey there,
So, I created an "AI" of sorts, specifically, a move-to player action. As you can see below, the monster sets the angle towards the player and then moves toward the player, one pixel per tick. This has been fine for a while, but now I need the Monster to stop changing it's angle.
Image

I went through all of the actions but I just can't seem to find one that will allow LOS movement towards the Player, without changing the angle of the object being moved. Can anyone help?

Thank You,
Stephen
B
56
S
15
G
13
Posts: 825
Reputation: 17,643

Post » Fri Sep 02, 2016 8:06 am

Instead of having it set the angle and move forward, could you just have it move at the angle (monster.x,monster.y,player.x,player.y)?
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Fri Sep 02, 2016 9:30 am

Tekniko wrote:Hey there,
So, I created an "AI" of sorts, specifically, a move-to player action. As you can see below, the monster sets the angle towards the player and then moves toward the player, one pixel per tick. This has been fine for a while, but now I need the Monster to stop changing it's angle.
Image

I went through all of the actions but I just can't seem to find one that will allow LOS movement towards the Player, without changing the angle of the object being moved. Can anyone help?

Thank You,
Stephen


Hey Tekniko, you can also use the BULLET plugin.

If overlapping at offest, set bullet speed to [whatever you want]
If x overlapping at offest, set bullet speed to zero.
Great thing about the bullet function is you can set the sprite to NON-ROTATING but still move towards player.
Image Image Image
B
29
S
11
G
27
Posts: 729
Reputation: 16,995

Post » Fri Sep 02, 2016 10:23 am

Thanks for the help. I ended up switching to 8 directional movement and programming my own logic.

It does what I need it to do for now but I see issues down the road when it comes to path finding.
B
56
S
15
G
13
Posts: 825
Reputation: 17,643


Return to How do I....?

Who is online

Users browsing this forum: marc254 and 7 guests