- Joined
- Aug 18, 2011
- Messages
- 73
Hello
Ive noticed my trigger is bugged but i cant find the bug but i can explain the bug: i created a spell that whenever X unit get the defender`s tank item then create a real tank (with cargo) and then order to load that hero its gonna working well but the second trigger called unload seems to be bugged this trigger does: a unit starts effect the unload ability then unloads the loaded unit ,remove the unit and restore the item
but the bug is this trigger will works just for one time then unload trigger wont work at all
here is the triggers
Thanks in advance
Ive noticed my trigger is bugged but i cant find the bug but i can explain the bug: i created a spell that whenever X unit get the defender`s tank item then create a real tank (with cargo) and then order to load that hero its gonna working well but the second trigger called unload seems to be bugged this trigger does: a unit starts effect the unload ability then unloads the loaded unit ,remove the unit and restore the item
but the bug is this trigger will works just for one time then unload trigger wont work at all
here is the triggers
-
Defenders Tank Create
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Defender Tank
-
Actions
- Set Siege_UnitUser = (Hero manipulating item)
- Set siege_Item = (Item being manipulated)
- Set Siege_UOwner = (Owner of Siege_UnitUser)
- Set Siege_Point1 = (Position of Siege_UnitUser)
- -------- Create --------
- Unit - Create 1 Defender Tank for Siege_UOwner at Siege_Point1 facing 90.00 degrees
- Set Siege_Defender = (Last created unit)
- Unit Group - Add Siege_Defender to Siege_Group
- -------- Point Bug Fix --------
- Unit - Move Siege_Defender instantly to (Position of siege_Item)
- -------- Hashtable --------
- Hashtable - Save Handle OfSiege_UnitUser as 1 of (Key (Last created unit)) in Hash
- Hashtable - Save Handle Ofsiege_Item as 2 of (Key (Last created unit)) in Hash
- Hashtable - Save Handle OfSiege_UOwner as 3 of (Key (Last created unit)) in Hash
- Hashtable - Save Handle OfSiege_Point1 as 4 of (Key (Last created unit)) in Hash
- Hashtable - Save Handle OfSiege_Defender as 5 of (Key (Last created unit)) in Hash
- -------- Actions --------
- Unit - Order Siege_Defender to Load Siege_UnitUser
- Custom script: call RemoveLocation(udg_Siege_Point1)
- Item - Remove siege_Item
-
Events
-
Defenders Tank Unload
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Unload Instant DT
-
Actions
-
Unit Group - Pick every unit in Siege_Group and do (Actions)
-
Loop - Actions
- Set Siege_Defender = (Picked unit)
- Set Siege_UnitUser = (Load 1 of (Key (Picked unit)) in Hash)
- Set siege_Item = (Load 2 of (Key (Picked unit)) in Hash)
- Set Siege_UOwner = (Load 3 of (Key (Picked unit)) in Hash)
- Set Siege_Point1 = (Load 4 of (Key (Picked unit)) in Hash)
- Set Siege_Point2 = (Position of Siege_Defender)
- Item - Create Defender Tank at Siege_Point2
- -------- Removing --------
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hash
- Unit - Remove Siege_Defender from the game
- Custom script: call RemoveLocation(udg_Siege_Point2)
- Custom script: call RemoveLocation(udg_Siege_Point1)
- Custom script: call DestroyGroup (udg_Siege_Group)
-
Loop - Actions
-
Unit Group - Pick every unit in Siege_Group and do (Actions)
-
Events
Thanks in advance