Jump to Position

Get help using Construct 2

Post » Sat Jul 20, 2013 2:27 am

I'm wondering if anyone has figured out how to use the platform behavior to jump to a specific position or sprite with a different starting position each time. (ie. if an enemy is chasing you and it jumps back to it's original location to start a new attack)
B
41
S
12
G
1
Posts: 540
Reputation: 4,188

Post » Sat Jul 20, 2013 6:27 am

Here's an example of how I've implemented this in my own games:

https://dl.dropboxusercontent.com/u/30588726/Not%20Pasu/jumptiming.capx
B
6
S
2
Posts: 15
Reputation: 1,123

Post » Sat Jul 20, 2013 8:09 am

This is actually pretty smart. Thanks, Suikama!
B
41
S
12
G
1
Posts: 540
Reputation: 4,188

Post » Sat Jul 20, 2013 5:23 pm

No problem. Also if you want to jump back to be more of an even arc, try something like creating a variable at the time you want to jump that is equal to Self.X - StartingX, then move the sprite (that variable)/(number of pixels to move per frame).
B
6
S
2
Posts: 15
Reputation: 1,123


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests