Unit Keyboard Movement
An easy to use keyboard movement system with both cardinal (north, south, east, west), and relative style movement.
Features:
- Cardinal style of movement. Pressing forward makes a unit go north, left makes a unit go west, etc.. The directional north can be changed on a per player basis. Example: If you have a third person camera system you can make "north" equal to the camera facing so the unit will walk towards the camera facing when pressing forward.
- Relative style of movement, with strafing. Forward will make the unit walk towards his facing, left will make him turn left, etc. Strafing left/right will cause the unit to walk towards his left/right.
- Both modes support multiple key presses. Example: Using Cardinal movement, pressing forward and left will cause the unit to move NW. Using relative movement, a unit can turn while moving forward.
- Both modes can support as many units as you'd ever need.
- A movement mode can be switched for any unit on the fly.
- Configurable keys.
Known Bugs/Issues (will be fixed soon):
- While strafing, units will not also turn.
- Moving forward, then stafing does not produce diagonal movement.
- Moving forward, strafing, then releasing strafe does not return the unit to it's foward movement.
- Relative movement does not work with Collossus (or any unit with "turret" facing).
- Optimizations to be made.
UPDATE UPDATE I've been looking into a good method for this, tried your map. it works but it has somewhat of a similar problem my "research" has led me to...slight delays in the time you press the key to the unit reaction...any ideas?
Lol, no problem.
Thank you soooooooo veeeeeeery much. it works so now i can create an awesome third person shooter. my many thanks, there is no way i can thank you enough. thank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank you thank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank you thank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank youthank you
@ROFLCoptersoi Hello, and thanks for your interest. My library currently could use an update, but if you are happy with it and would like to use it now, follow these steps:
hi i downloaded your keyboard movement system and tested it. it worked great in your map, but i cant get it to transfer to my map. could you explain, as you would to an idiot, how to do so?
This has been put on the back burner for the moment while I work on other things. So, the few bugs/optimizations that should be fixed might not happen very soon.
BUT, if you are using this and would really like it to be updated tell me and I'll make it more of a priority :)
See the demo map for example usage and how to make a camera follow a unit and make the unit move towards camera facing.
If you're getting a compile error after importing this library, you need to set the library ID. Right-click the library, go to Library, then press Change Library Id. Click "Use Shared Id" and in the hexadecimal box enter in: 98B7C3F0
Sorry, it's a bug.