• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Bug on it but i cant find it!

Status
Not open for further replies.
Level 4
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
  • 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
  • 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)
now someone help he to fix the bug please or create a better one for me
Thanks in advance
 
Level 4
Joined
Aug 18, 2011
Messages
73
Ty man +rep
After this variable and handle keys would my trigger be fine and mui?
because i figure out it wont be mui whenever a unit loaded to tank and another hero does the (unload) you know all of the them would be unloaded from tanks how can i fix it?
 
Level 4
Joined
Aug 18, 2011
Messages
73
oh the first problem is solved
but the second one i mean a unit is loaded it will work fine to load and unload but the bug will be appear when another hero uses other tank (mui problem)
but i cant understand why its happening because i used hashtables and store the datas
i added
  • Set Siege_KeyHandle = (Last created unit)
to first trigger then i load them in second trigger but seems not to work can you guide me about it?
 
Status
Not open for further replies.
Top