i know you can not do this in the DATA editor so my best guess is for triggers. what i would like to do is modify a units speed based on how much energy they have EG: ghost has 200 energy so it moves at 100% speed. if it has 100energy then it moves at 50%. and so on. if it has 0 speed it can not move. i know there is a trigger to change unit property such as speed. but i dont know how to put the event/conditions. any ideas?
@tdhsst: Go It's possible to make it through data if you dont want an exact correlation. You could set a few categories. But maybe it's easier to use triggers.
Quote from SoulFilcher:
@tdhsst: Go It's possible to make it through data if you dont want an exact correlation. You could set a few categories. But maybe it's easier to use triggers.
----
and how would you do this in data? i dont know....
Though, to be honest, using behaviors is more appropriate here, as you can set times and what have you, but I believe this will solve your problem trigger-wise.
As the unit gains energy back, just do it backwards.
Changing catalog values through triggers tends to get buggy, so be ready to look for overly-complicated fixes.
EDIT: Silly me, I'll leave my post attached but if you use "set unit property" and in the slot with the number use arithmetic it works just as well and probably work smoother.
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
EDIT: Silly me, I'll leave my post attached but if you use "set unit property" and in the slot with the number use arithmetic it works just as well and probably work smoother.
Just happy to provide assistance and I hope it helps you! :)
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
To post a comment, please login or register a new account.
i know you can not do this in the DATA editor so my best guess is for triggers. what i would like to do is modify a units speed based on how much energy they have EG: ghost has 200 energy so it moves at 100% speed. if it has 100energy then it moves at 50%. and so on. if it has 0 speed it can not move. i know there is a trigger to change unit property such as speed. but i dont know how to put the event/conditions. any ideas?
@tdhsst: Go maybe works
Set unit propery - Set unit's movement speed = unit's movement speed (default) * unit's current energy (percent)
event can be a periodic event or when unit changes energy
@tdhsst: Go It's possible to make it through data if you dont want an exact correlation. You could set a few categories. But maybe it's easier to use triggers.
Quote from SoulFilcher:
@tdhsst: Go It's possible to make it through data if you dont want an exact correlation. You could set a few categories. But maybe it's easier to use triggers.
----
and how would you do this in data? i dont know....
@tdhsst: Go
It's a little tricky, but to work it in triggers first of all you'll need to do some calculations.
You need to know how much speed is at 100%, 50%, and so on.
Since you know this, then you need to figure out how much speed should be subtracted for each unit of energy (lets say 1).
Based on the information, it seems to be a 1:1 ratio. So then you do something along these lines:
Though, to be honest, using behaviors is more appropriate here, as you can set times and what have you, but I believe this will solve your problem trigger-wise.
As the unit gains energy back, just do it backwards.
Changing catalog values through triggers tends to get buggy, so be ready to look for overly-complicated fixes.
EDIT: Silly me, I'll leave my post attached but if you use "set unit property" and in the slot with the number use arithmetic it works just as well and probably work smoother.
EDIT: Silly me, I'll leave my post attached but if you use "set unit property" and in the slot with the number use arithmetic it works just as well and probably work smoother.
LOL^^^^..thank you for your responce.
@tdhsst: Go
Just happy to provide assistance and I hope it helps you! :)