hard hit

Game Editor comments and discussion.

hard hit

Postby BogdansB » Mon Jan 02, 2012 10:11 am

hey,

how can i make a variable be a number which is the speed of an actor collides another actor...
BogdansB
 
Posts: 94
Joined: Tue Oct 25, 2011 2:30 pm
Score: 0 Give a positive score

Re: hard hit

Postby phyzix5761 » Mon Jan 02, 2012 10:45 am

If I understand you correctly,

1. Make a variable named "velocity" for example
2. In the collision event add this:

velocity = actorName.yvelocity; (actorName being the name of the actor that you want the velocity of.)

((If you want the x velocity then just write velocity = actorName.xvelocity;))

I hope that helped.
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: hard hit

Postby BogdansB » Mon Jan 02, 2012 11:23 am

yes thank you :D
BogdansB
 
Posts: 94
Joined: Tue Oct 25, 2011 2:30 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest