Enemy follow player without rotating?

Get help using Construct 2

Post » Wed Feb 13, 2013 8:29 am

http://stevemazzaro.com/CAPXTest.zip

Sorry try this.
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Wed Feb 13, 2013 9:13 am

[QUOTE=ome6a1717] http://stevemazzaro.com/CAPXTest.zip

Sorry try this.[/QUOTE]

I did not see a clear problem with this .capx, could you describe a bit more what you wish to achieve? Is there some specific way of moving you are looking for or do you wish to simplify your events?

Nice visuals by the way :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Wed Feb 13, 2013 9:28 am

Thanks :).

This is basically what I'm trying to achieve:



When the player enters one of the "WalkX" groups in the image, the BadGuy plays the "WalkX" animation. Right now it's doing this, but at a 0, 90, 180, & 270 degree setup. However, when I try setting what I currently have to "is between angle XY + XY", it still doesn't work.

It's almost as if even while moving, the BadGuy's angle parameter is never actually set.
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Wed Feb 13, 2013 11:28 am

Gotcha, this should be what you are looking for:

Enemy angle example

It's not as simple as I wished, probably someone can come up with solution that doesn't need the extra angle conversions and stuff.

And you are correct, when moving the badguys angle parameter is actually never set, it is only set when you rotate the sprite. So angle is 0 all the time, changing animations doesn't change the angle of the sprite itself. In this sort of movement we don't really need to set the angle to anything else anyway. :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Wed Feb 13, 2013 3:37 pm

Hey Vee,

I can't seem to open this - it says somehow that you're on version 118, while I'm on version 114. I purchased this off steam, so in theory it should always be up to date?

Any chance it's short enough you can just upload an image?

Thanks so much!
Steve
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Wed Feb 13, 2013 4:16 pm

Here you go:



You can also opt in for beta updates in steam if you wish, you can find instructions in this blog post.

List of most recent releases can also be found/downloaded here!
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Wed Feb 13, 2013 4:41 pm

Vee you are a genius!!

Everything works great - just one small quibble. When on the right side of the target, the animation switches to WalkUp once you're at the 0 degree mark as opposed to the 324 mark.

Thanks again - I really appreciate it.

Steve
B
22
S
3
Posts: 451
Reputation: 2,135

Previous

Return to How do I....?

Who is online

Users browsing this forum: Justin1967, qaisarehman and 33 guests