- Joined
- May 16, 2020
- Messages
- 660
Hi guys,
I have a quite simple trigger, but it's not working anymore (it worked 2 months ago >_>)
The problem is that the unit is not added to the group. Essentially this part of the trigger:
I usually solve this by adding this line, but here I don't want to create a new group everytime the spell is cast.
FYI: The array of the group is [1] - I think this is OK here though... (but never really understood this)
Does anyone know how to fix this?
I have a quite simple trigger, but it's not working anymore (it worked 2 months ago >_>)
The problem is that the unit is not added to the group. Essentially this part of the trigger:
-
Unit Group - Add Enchant_Target to Enchant_Group[Enchant_CV]
I usually solve this by adding this line, but here I don't want to create a new group everytime the spell is cast.
-
Custom script: set udg_Group[X] = CreateGroup()
FYI: The array of the group is [1] - I think this is OK here though... (but never really understood this)
Does anyone know how to fix this?
-
Enchant
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Enchant
-
-
Actions
-
Set VariableSet Enchant_Caster = (Triggering unit)
-
Set VariableSet Enchant_CV = (Custom value of Enchant_Caster)
-
Game - Display to (All players) the text: (String(Enchant_CV))
-
Set VariableSet Enchant_Target = (Target unit of ability being cast)
-
Set VariableSet Enchant_Stats[1] = (100 + (100 x (Level of Enchant for Enchant_Caster)))
-
Set VariableSet Enchant_Stats[2] = (-10 + (20 x (Level of Enchant for Enchant_Caster)))
-
Set VariableSet Enchant_Stats[3] = (2 x (Level of Enchant for Enchant_Caster))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Enchant_Target is A Hero) Equal to False
-
(Enchant_Target is An Ancient) Equal to False
-
(Enchant_Target is an illusion) Equal to False
-
(Owner of Enchant_Target) Not equal to Player 13 (Maroon)
-
-
Then - Actions
-
Game - Display to (All players) the text: (String((Number of units in Enchant_Group[Enchant_CV])))
-
Unit Group - Pick every unit in Enchant_Group[Enchant_CV] and do (Actions)
-
Loop - Actions
-
Unit - Kill (Picked unit)
-
Unit Group - Remove (Picked unit) from Enchant_Group[Enchant_CV].
-
-
-
Unit Group - Add Enchant_Target to Enchant_Group[Enchant_CV]
-
Unit - Remove All buffs from Enchant_Target
-
Unit - Change ownership of Enchant_Target to (Owner of Enchant_Caster) and Change color
-
Special Effect - Create a special effect attached to the origin of Enchant_Target using war3mapImported\Enchant.mdx
-
Special Effect - Destroy (Last created special effect)
-
Unit - Add a (30.00 x (Real((Level of Enchant for Enchant_Caster)))) second Generic expiration timer to Enchant_Target
-
Custom script: call AddUnitBonus(udg_Enchant_Target, BONUS_HEALTH, udg_Enchant_Stats[1])
-
Custom script: call AddUnitBonus(udg_Enchant_Target, BONUS_DAMAGE, udg_Enchant_Stats[2])
-
Custom script: call AddUnitBonus(udg_Enchant_Target, BONUS_ARMOR, udg_Enchant_Stats[3])
-
Unit - Set Unit: Enchant_Target's Real Field: Hit Points ('uhpc') to Value: (Max life of Enchant_Target)
-
-
Else - Actions
-
-
-
Last edited: