I was trying to make a little wasd movement system for myself but stumbled upon an annoying problem.
You know when you open your windows notepad and hold down for example the "w" key it wil go like "w...pause wwwwwwwwwwwwwwwwwww"
so it pauses and then checks if the key is still pressed or something. However when i was testing my movement system i noticed it works the same in starcraft, whenever i hold down an ability hotkey it first executes the ability once, pauses, and then starts spamming it.
So the question is:
Am i able to somehow disable this so it just instanlty starts spamming or is this a more technical kind of problem like ppl would have to change things in windows settings to not make this happen?
You want to make wasd movement with data? You could add a cooldown for the ability. Or do like i did: when the W key is pressed it gives a behavior to the unit called W and as long as the unit has this behavior, he moves forward.
Yeh but this mean that users that play my game will most likely have this setting on so they will experience the pause everytime they move, so yeh i cant change this with the editor, thats a bummer.
Yes that way will cause the problems you are experiencing. If you do it in trigger you should have the event be a periodic timer that moves the unit if a condition is true. The condition ca be two things, a varible or a behavior.
Global variable - Move (boolean)
Event - unit uses ability
Condition
Action
Set Move = true
Wait 0.5 sec
Set Move = false
Or the ability can give the unit a behavior buff that lasts 0.5.
Then the trigger
Event - periodic event
Condition - Move = true (Or unit has behavior)
Order unit to...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey guys,
I was trying to make a little wasd movement system for myself but stumbled upon an annoying problem. You know when you open your windows notepad and hold down for example the "w" key it wil go like "w...pause wwwwwwwwwwwwwwwwwww" so it pauses and then checks if the key is still pressed or something. However when i was testing my movement system i noticed it works the same in starcraft, whenever i hold down an ability hotkey it first executes the ability once, pauses, and then starts spamming it.
So the question is:
Am i able to somehow disable this so it just instanlty starts spamming or is this a more technical kind of problem like ppl would have to change things in windows settings to not make this happen?
thx for the time
@Rice87: Go
You want to make wasd movement with data? You could add a cooldown for the ability. Or do like i did: when the W key is pressed it gives a behavior to the unit called W and as long as the unit has this behavior, he moves forward.
It's set in your operating system settings.
In Windows it's just settings -> keyboard and there you can define it.
@LaxSalmon: Go
No im doing it different, i made an instant effect ability and use it for example like:
@Ahli634: Go
Yeh but this mean that users that play my game will most likely have this setting on so they will experience the pause everytime they move, so yeh i cant change this with the editor, thats a bummer.
@Ahli634: Go
I set the keyboard repeat delay to the lowest value but still it pauses after the first input.
Works for me. Easiest to test with hatcheries and enough larvas.
There is a small delay that might not be changeable after the first and the other inputs.
But you could just use triggers and the holding down/releasing events.
@Rice87: Go
Yes that way will cause the problems you are experiencing. If you do it in trigger you should have the event be a periodic timer that moves the unit if a condition is true. The condition ca be two things, a varible or a behavior.
Global variable - Move (boolean)
Event - unit uses ability
Condition
Action
Set Move = true
Wait 0.5 sec
Set Move = false
Or the ability can give the unit a behavior buff that lasts 0.5.
Then the trigger Event - periodic event Condition - Move = true (Or unit has behavior)
Order unit to...