I am working on a turn based mode, and now i am standing infront of a little problem:
i can´t find a way to block the movment before an attack. What i mean is the following : Your heros weapon(standard Attack) /ability (for example Snipe) has a Range of 5, and the enemy is standing 7 away. If you use the ability on the enemy, the hero will move closer to him and fire, which is bad. I want him to stay where he is, and maybe a message saying : to far away...
Thx for the idea, but i solved it myself, without the need of a trillion triggers :D (Simply remove the "move" ability when it is not needed, and add it when the unit moves.. ) Easy, doh! :D
But now i have a nother big Problem, maybe someone knows the answer : Line of Sight. What i want is the following : A unit shouldonly be able to use an attack or ability if it has a direct Line of Sight to the target. As it is for now, as long as the enemy is visible, you can attack it. For example : Snipe, my Sniper can hit the target even behind a huge mountain, as long as it is visible...
Oh, and another thing : Can you add Tiem to a Timer? Lets say something like :
Event :A Unit kills any unit
Action : add 2 seconds to Timer
i can´t find a add funktion, and Set Variable doesn´t have this option either...
Oh, and another thing : Can you add Tiem to a Timer? Lets say something like : Event :A Unit kills any unit Action : add 2 seconds to Timer
i can´t find a add funktion, and Set Variable doesn´t have this option either...
Just get Timers Remaining time, and start it new with this time+2
Something like :Timer - Start timer as a One Shot timer that will expire in ((Remaining time of timer) + 2.0) Game Time seconds
In the data editor in the abilities range you can uncheck the approach flag and then it won't move to use the ability.
i thought of that too, but you can´t turn of it with the "attack" ability. And i definitly need that, otherwise i can´t use different Weapons via items. (or at least i don´t know how i could use them)
Quote:
Just get Timers Remaining time, and start it new with this time+2 Something like :Timer - Start timer as a One Shot timer that will expire in ((Remaining time of timer) + 2.0) Game Time seconds
Hmmm i guess that won´t work, because as soon as the new timer starts, the old one is expired, and that would trigger some events...
For the line of Sight problem:
Maybe u could start a Loop, which checks the height of every point Between Unit and Target. Maybe for every 0.3 Scale unit thing.(Btw, what is the measure named?)
For the line of Sight problem: Maybe u could start a Loop, which checks the height of every point Between Unit and Target. Maybe for every 0.3 Scale unit thing.(Btw, what is the measure named?)
hmmm i have no idea how to do that :D
PS : i think that won´t work, because then i can never ever again attack a Unit on a cliff.... i think its impossible
Hi there
I am working on a turn based mode, and now i am standing infront of a little problem: i can´t find a way to block the movment before an attack. What i mean is the following : Your heros weapon(standard Attack) /ability (for example Snipe) has a Range of 5, and the enemy is standing 7 away. If you use the ability on the enemy, the hero will move closer to him and fire, which is bad. I want him to stay where he is, and maybe a message saying : to far away...
Is there any "easy" way to do this?
EVENT
unit uses ability
CONDITION
ability = snipe
ACTION
if range > 5
issue order with no point (stop) to triggering unit
Don't forget to give a message if the range is too big, or ppl won't understand :)
Hi again
Thx for the idea, but i solved it myself, without the need of a trillion triggers :D (Simply remove the "move" ability when it is not needed, and add it when the unit moves.. ) Easy, doh! :D
But now i have a nother big Problem, maybe someone knows the answer : Line of Sight. What i want is the following : A unit shouldonly be able to use an attack or ability if it has a direct Line of Sight to the target. As it is for now, as long as the enemy is visible, you can attack it. For example : Snipe, my Sniper can hit the target even behind a huge mountain, as long as it is visible...
Oh, and another thing : Can you add Tiem to a Timer? Lets say something like : Event :A Unit kills any unit Action : add 2 seconds to Timer
i can´t find a add funktion, and Set Variable doesn´t have this option either...
In the data editor in the abilities range you can uncheck the approach flag and then it won't move to use the ability.
Just get Timers Remaining time, and start it new with this time+2 Something like :Timer - Start timer as a One Shot timer that will expire in ((Remaining time of timer) + 2.0) Game Time seconds
i thought of that too, but you can´t turn of it with the "attack" ability. And i definitly need that, otherwise i can´t use different Weapons via items. (or at least i don´t know how i could use them)
Hmmm i guess that won´t work, because as soon as the new timer starts, the old one is expired, and that would trigger some events...
Then do a second timer and do kind of Flip, check wich timer is used and stuff.
i made it so, that the timer pauses. Same effect, works as intended :D
any idea for the Line of Sight problem? Thats my biggest worry for now...
Depends on what the timer is needed for ;)
For the line of Sight problem: Maybe u could start a Loop, which checks the height of every point Between Unit and Target. Maybe for every 0.3 Scale unit thing.(Btw, what is the measure named?)
hmmm i have no idea how to do that :D
PS : i think that won´t work, because then i can never ever again attack a Unit on a cliff.... i think its impossible