Simplified AWSD Movement
Hey guys, first off I want to apologize if I am stepping on anybody's toes with this submittal. I know several people have devised AWSD key movement systems, but I noticed that the ones being shared were HIGHLY inefficient using a continuous trigger call every 0.05 seconds regardless of what actions were being taken by the player. Also when trying to use this system with multiple players it pretty much crashed the game every time.
I thought surely there must be a better alternative than using this logic, so I created this system. It has been tested with multiple players and works extremely well and does not bog down the map after a couple minutes (like other AWSD systems seem to do). My system also seems to be much smoother and causes less delay. One thing to note about this asset is that no unit animations are being performed so you will need to modify the triggers to perform whatever unit animations you desire. The triggers are broken down pretty nicely and I think you will find them very easy to understand and modify for your personal needs.
Again if this or a better solution have already been posted, I apologize for the duplicate information. Hope you guys enjoy!
if you use a actual unit the walking animation doesn't play so it looks like they are gliding..
Justmashu: All you need to do is assign whatever unit you want to move around to the unit array I have setup in the corresponding player index. Currently it's a unit array (or unit group, I can't remember) that holds one unit for each player. Example: Set UnitArray[1] = Player1Unit.
BrotherLaz: Well first off, thank you for your feedback. Yes there is the overlapping of keys, but I've already eliminated this in my current deployment...which I have abandoned in favor of a new movement system altogether.
I don't anticipate people will be using this kind of movement for long. I'm currently working on a movement system that requires NEXT TO NO repeating triggers. If I were still working on this one it would've had some major improvements by now, but I've been focusing on a system that eliminates ALL repeating triggers - meaning it's actually viable for multiplayer use.
Check my projects often if you're interested, I will be releasing a version of it as soon as I work out unit collision.
So instead of a periodical trigger every 0.05 seconds, this runs one trigger every 0.05 seconds for each key you press, including some contradictory commands like turning left and right at the same time which results in doing nothing at the cost of two periodical triggers. I'm not sure this is really faster.
On the upside though it is very clean - no glitches, no stuttering, no bugs, no immense triggers... And pressing forward and reverse at the same time results in a slow forwards motion, which is actually useful. Also, the method allows for trivial implementation of strafing and does not require a trigger to cancel right clicks on the ground or even a move command at all. Hell, you can attack on the move.
If you use this trigger in your own map, you may want to implement collision checks because you'd go right over cliffs and through buildings. Nothing two lines of triggers can't fix (for each unit type structure add circular region with size equal to radius of picked unit to your collision region; if destination point is in collision region, don't move; if destination point is on a different cliff level, don't move) but it may be worth adding considering the target audience for this is people who can't implement WASD controls by themselves.
Nit: there is an error in the trigger events. Press a key, hold Shift, release the key and you get stuck in motion. Easy to fix, and 'cruise control' has its own advantages, but this could maybe be made into a toggle.
I really like the smoothness of this over the others.
Is there a way to use this in a new map instead of modifying this one?