• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How Do I Bind The Arrow Keys?

Status
Not open for further replies.
Level 1
Joined
Jun 24, 2009
Messages
1
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:
Level 13
Joined
Apr 15, 2008
Messages
1,063
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.
Top