• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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 12
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