Ok, so i've created some attributes for my hero. Strength, agi and int.
When my unit reach 10 kills, its strength increase by one, 20 another point, 30 another, and so forth.
For agi, I created 1 variable and 2 trigger. The variable is an integer that calculates the number of time the unit has been hit. The first trigger increase that variable ehenever the hero is attacked and the second trigger increase the agi by 1 when the variable reach 10 and set back the variable to 0.
Here's my problem. I want to do the same with the intelligence. 1 variable (integer) that calculate the number of spell casted. 1 trigger that increase that variable whenever my hero cast a spell, etc. BUT I can't, in the triggers, set :
Unit - Zealot [128.43, 125.24] uses ANY ABILITY at Generic6 - Complete stage (Ignore shared abilities)
I've searched a lot but can't find anything tat would start my trigger whenever he cast a spell. The only would be to create like 4 trigger (one per spells)?
There is an Event type that fires when unit is "issued an order to Any Ability Command.." but it also fires just when you tell it to move, since that's an ability. It looks like the easiest way to do what you want would be to just put 4 events in one trigger, so that each spell performs the action. Unless you want each spell to raise your variable by a different amount or something.
Didn't know about the event, I'll serch in this. I know that it wouldn't be hard to put 4 events but I'm plannig to create a lot of heros and i dont want to set 4x40 events :S Thx :P
Edit: Nop, you're right, even moving increase my variable.
Actions
Unit - Add 1 Strength Bonus to Zealot [128.43, 125.24] from 1
Variable - Set Kills Player 1 = (Kills Player 1 + 10)
Here's my code to add str to the hero. I created a basic cone damage skill, but i noticed that if my hero kills 20 unit with the skill, he'll only gain 1 str. I think that the problem is that the 20 kills are all at the same time, making the trigger run only once and so, adding only 1 str. I can't figure out how to solve my problem :S Maybe I should set the amount of str by dividing it's kill by 10 rounded down, but how?
(Sry for my english :S I'm french)
you could add a while condition [the one that you place under "Actions", that is
do while Conditions (Zealot [128.43, 125.24] kills (Current)) >= (Kills Player 1 + 10) is true {
then do your actions, that way, your actions will happen twice (or until that is no longer true)
}
Ok, so i've created some attributes for my hero. Strength, agi and int.
When my unit reach 10 kills, its strength increase by one, 20 another point, 30 another, and so forth.
For agi, I created 1 variable and 2 trigger. The variable is an integer that calculates the number of time the unit has been hit. The first trigger increase that variable ehenever the hero is attacked and the second trigger increase the agi by 1 when the variable reach 10 and set back the variable to 0.
Here's my problem. I want to do the same with the intelligence. 1 variable (integer) that calculate the number of spell casted. 1 trigger that increase that variable whenever my hero cast a spell, etc. BUT I can't, in the triggers, set :
Unit - Zealot [128.43, 125.24] uses ANY ABILITY at Generic6 - Complete stage (Ignore shared abilities)
I've searched a lot but can't find anything tat would start my trigger whenever he cast a spell. The only would be to create like 4 trigger (one per spells)?
There is an Event type that fires when unit is "issued an order to Any Ability Command.." but it also fires just when you tell it to move, since that's an ability. It looks like the easiest way to do what you want would be to just put 4 events in one trigger, so that each spell performs the action. Unless you want each spell to raise your variable by a different amount or something.
@ragoulette: Go
Didn't know about the event, I'll serch in this. I know that it wouldn't be hard to put 4 events but I'm plannig to create a lot of heros and i dont want to set 4x40 events :S Thx :P
Edit: Nop, you're right, even moving increase my variable.
@ragoulette:
Do what was said above but put a condition "ability != move"
@Pinworm45: Go
!!! any ability is used except move, attack, stop, hold position and patrol... Awesome lol. THX!
Got another problem :S
Strength by kills
Events Unit - Zealot [128.43, 125.24] Kills changes
Local Variables
Conditions (Zealot [128.43, 125.24] kills (Current)) >= (Kills Player 1 + 10)
Actions Unit - Add 1 Strength Bonus to Zealot [128.43, 125.24] from 1
Variable - Set Kills Player 1 = (Kills Player 1 + 10)
Here's my code to add str to the hero. I created a basic cone damage skill, but i noticed that if my hero kills 20 unit with the skill, he'll only gain 1 str. I think that the problem is that the 20 kills are all at the same time, making the trigger run only once and so, adding only 1 str. I can't figure out how to solve my problem :S Maybe I should set the amount of str by dividing it's kill by 10 rounded down, but how? (Sry for my english :S I'm french)
@ragoulette: Go
you could add a while condition [the one that you place under "Actions", that is do while Conditions (Zealot [128.43, 125.24] kills (Current)) >= (Kills Player 1 + 10) is true {
then do your actions, that way, your actions will happen twice (or until that is no longer true) }
@Molsterr: Go
THX!!! you guys are awesome XD