How Do I Bind The Arrow Keys?

Status
Not open for further replies.

Blest

B

Blest

Does anyone know a way I can bind the arrow keys ( up, down, left, right), so that I can make the character move in the game as if it were a 2D Side-Scroller game?

It would be great if someone could help me out, thanks.


::EDIT::

Never mind, I figured it out, does anyone know how to make a unit jump instead of moving up with W?

Like have the unit raise to a certain hight, then fall down at a certain speed?
 
Last edited by a moderator:
Jump: If you are using triggers, I would suggest using heigh and vertical speed. When the unit jumps, set vertical speed to some positive value, depending on how high you want to to jump. Then, every frame decrease the speed by some amount(g) and then modify the height by the speed. Eventually, speed becomes negative and the unit will fall instead of rise. Then, when it hits the ground, set the speed to 0.
I think that in sc2 scale, g of 4-5 looks reallistic, but I am not sure, It was back in beta when I did some physics.
Also, if you want the unit to be able to jump over stuff, you'll need to check collisions off (or better morph the unit to something with Fly movements), and check collisions manually, based on height.
 
Status
Not open for further replies.
Back
Top