damage/hit bounce back effects for player?

Non-platform specific questions.

damage/hit bounce back effects for player?

Postby Darc » Sun Mar 29, 2009 8:25 pm

how do you make a character when attacked or touched by an enemy move away with out bouncing away too far or out of control?
Last edited by Darc on Wed Apr 01, 2009 9:24 pm, edited 2 times in total.
Image
User avatar
Darc
 
Posts: 16
Joined: Sun Mar 29, 2009 2:07 am
Score: 0 Give a positive score

Re: damage/hit bounce back effects for player?

Postby skydereign » Sun Mar 29, 2009 10:54 pm

You need to familiarize yourself with variables to make this really efficient, but to get that result you need physical response. Or setting velocity upon collision.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: damage/hit bounce back effects for player?

Postby Zivouhr » Sat Oct 24, 2015 2:30 am

I create a path from Left to Right for a short distance. When the player hits the enemy, in the player collision with right side of enemy/script editor, I'll createPath for the player to respond to when hit on the left side by the enemy, to start the path so the player goes to the right.

Then be sure to add Path Finish in the player, and in that script editor, createPath (none) would be the way to stop the path.

You can add sound, animation also as needed, and may have to reference the draw actor event if necessary, with some variables like "hurtR" or "hurtL" depending.

I don't have the coding here, but that's the general idea. I hope that helps, even if it's 5+ years later. :D
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 549
Joined: Sat May 17, 2014 2:12 pm
Score: 59 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron