Player knock back questions

For questions about using Classic.

Post » Thu Jun 23, 2011 4:54 pm

Hello everyone! I am currently fooling around with a Zelda 1 clone to get to know Construct better, and hopefully as a stepping stone to something better. Right now I am currently trying to figure out a player damage knock back system I could use. I notice the eight direction behavior does have a bounce action, but it's not really adjustable. I am looking to have a bit more control over how far the player is knocked back, speed and how long the player loses movement control (not necessarily ALL controls). One big issues I am having trouble figuring out is how to determine which way to push the player back (i.e., player bumps the top side of the enemy, gets knocked towards the top of the screen). I might be back posting if I get stuck on figuring out invincibility frames, hah, until then thanks for your help in advance!
B
1
G
1
Posts: 2
Reputation: 429

Post » Thu Jun 30, 2011 8:11 pm

Just giving this a bump as I'm still sort of stumped here. Been busy with work so haven't made much progress.
B
1
G
1
Posts: 2
Reputation: 429

Post » Thu Jun 30, 2011 8:57 pm

For a custom bounce like that you'll need a timer. The timer behavior added to the sprite should work. It works like a function, you just add an action to call the function.

I'd set angle of motion to Sprite[8Direction].MovAngle-180, instead of bounce... same thing, you just get more control over the angle with set angle of motion. Then add actions to disable user input, and set speed.
And then add an action to call the object timer.
For the timer call just re-enable user input, and reset speed.

Examplenewt2011-06-30 21:25:23
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests