dyablohunter
New Member
- Reaction score
- 2
I have done these triggers so far:
The trap:
The lvl 1 trigger effect:
The trapped unit is freed if it is attacked:
It doesn't work... please smb tell me what I'm doing wrong. My guess so far is that the region doesn't get centered on the target point properly. Because I tested the region manually by luring an enemy hero into it and it works so please tell me why the region does not move to where I want it to? :banghead:
I have been struggling for almost 2 days with it.
The trap:
Code:
Ally Frost Trap
Events
Unit - A unit Starts the effect of an ability
Conditions
((Casting unit) belongs to an ally of (Owner of Ally_Beastmastery_Hunter)) Equal to True
(Ability being cast) Equal to Frost Trap [Hunter]
Actions
Unit Group - Pick every unit in (Units owned by (Owner of (Casting unit)) of type Frost Trap) and do (Actions)
Loop - Actions
Set Ally_Frost_Trap = (Picked unit)
Set Ally_Frost_Trap_Point = (Target point of ability being cast)
Region - Center Frost Trap Ally <gen> on Ally_Frost_Trap_Point
Custom script: call RemoveLocation(udg_Ally_Frost_Trap_Point)
If ((Level of Frost Trap [Hunter] for Ally_Beastmastery_Hunter) Equal to 1) then do (Trigger - Turn on Ally Frost Trap LvL 1 <gen>) else do (Do nothing)
If ((Level of Frost Trap [Hunter] for Ally_Beastmastery_Hunter) Equal to 2) then do (Trigger - Turn on Ally Frost Trap LvL 2 <gen>) else do (Do nothing)
If ((Level of Frost Trap [Hunter] for Ally_Beastmastery_Hunter) Equal to 3) then do (Trigger - Turn on Ally Frost Trap LvL 3 <gen>) else do (Do nothing)
If ((Level of Frost Trap [Hunter] for Ally_Beastmastery_Hunter) Equal to 4) then do (Trigger - Turn on Ally Frost Trap LvL 4 <gen>) else do (Do nothing)
The lvl 1 trigger effect:
Code:
Ally Frost Trap LvL 1
Events
Unit - A unit enters Frost Trap Ally <gen>
Conditions
((Entering unit) is A Hero) Equal to True
((Entering unit) belongs to an enemy of (Owner of Ally_Beastmastery_Hunter)) Equal to True
(Level of Frost Trap [Hunter] for Ally_Beastmastery_Hunter) Equal to 1
Actions
Unit - Kill Ally_Frost_Trap
Unit - Pause (Entering unit)
Special Effect - Create a special effect attached to the chest of (Entering unit) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
Set Ally_FrostTrap_Effect = (Last created special effect)
Wait 5.00 game-time seconds
Unit - Unpause (Entering unit)
Special Effect - Destroy Ally_FrostTrap_Effect
Trigger - Turn off (This trigger)
The trapped unit is freed if it is attacked:
Code:
Ally Frost Trap Debuff
Events
Unit - A unit Is attacked
Conditions
(Attacked unit) Equal to Ally_Frost_Trap_Target
Actions
Unit - Unpause Ally_Frost_Trap_Target
Special Effect - Destroy Ally_FrostTrap_Effect
It doesn't work... please smb tell me what I'm doing wrong. My guess so far is that the region doesn't get centered on the target point properly. Because I tested the region manually by luring an enemy hero into it and it works so please tell me why the region does not move to where I want it to? :banghead:
I have been struggling for almost 2 days with it.