Hey there!
I was creating a spell based on (Attribute Bonus) that increases strength based on the number of allies around the hero. Im having some problems on getting the number of units in unit group, any help is appreciated.
I was creating a spell based on (Attribute Bonus) that increases strength based on the number of allies around the hero. Im having some problems on getting the number of units in unit group, any help is appreciated.
-
Commander Copy
-
Events
-
Unit - A unit Learns a skill
-
-
Conditions
-
(Learned Hero Skill) Equal to Commander (Strength)
-
-
Actions
-
Set VariableSet Commander_TU = (Learning Hero)
-
Trigger - Turn on Commander Loop <gen>
-
-
-
Commander Loop
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
(Level of Commander (Strength) for Commander_TU) Greater than 0
-
(Commander_TU is alive) Equal to True
-
-
Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 800.00 of (Position of Commander_TU) matching ((((Matching unit) belongs to an enemy of (Owner of Commander_TU).) Equal to False) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is dead) Equal to False))).) and do (Actions)
-
Loop - Actions
-
Set VariableSet Commander_NumberofUnits = (10 x (Number of units in (Last created unit group)))
-
Game - Display to (All players) the text: (Parse (String(Commander_NumberofUnits)))
-
Ability - Set Ability: (Unit: Commander_TU's Ability with Ability Code: Commander (Strength) )'s Integer Level Field: Strength Bonus ('Istr') of Level: ((Level of Commander (Strength) for Commander_TU) - 1) to Commander_NumberofUnits
-
Ability - Set Extended Tooltip of Commander (Strength) to for level ((Level of Commander (Strength) for Commander_TU) - 1)
-
Unit Group - Remove (Picked unit) from (Last created unit group).
-
-
-
-