• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

There Seems to be a Leak, But...>.<"

Status
Not open for further replies.
Level 1
Joined
Aug 22, 2010
Messages
3
...I can't find it! Anyway, below are the triggers I think are responsible. As you can probably tell, I'm doing something with an Invoker (the DotA hero, ya know? XD).
Anyway, whenever he casts the Wex or Quas(not shown here) ability, the custom value of the caster is updated to form an integer, e.g, cast Quas three times, you get 111. Then, this value is checked to determine what ability to give him. In this case, three Wexes give you the Power Charge ability.
So, casting the Quas and Wex abilities continuously eventually causes increasing lag...and I have no idea why..>.<
Would appreciate any help...^.^

p.s, The trigger logic may not be that great, but well....hehe, i may be considered a n00b of sorts....this would be only my second serious custom map...

  • Wex
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wex
    • Actions
      • Hashtable - Save (String((Custom value of (Triggering unit)))) as 0 of (Key (Triggering unit)) in HElementSlots
      • Hashtable - Save (Substring((Load 0 of (Key (Triggering unit)) from HElementSlots), 2, 2)) as 3 of (Key (Triggering unit)) in HElementSlots
      • Hashtable - Save (Substring((Load 0 of (Key (Triggering unit)) from HElementSlots), 1, 1)) as 2 of (Key (Triggering unit)) in HElementSlots
      • Hashtable - Save 2 as 1 of (Key (Triggering unit)) in HElementSlots
      • Unit - Set the custom value of (Triggering unit) to (Integer(((Load 1 of (Key (Triggering unit)) from HElementSlots) + ((Load 2 of (Key (Triggering unit)) from HElementSlots) + (Load 3 of (Key (Triggering unit)) from HElementSlots)))))
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in HElementSlots
      • Floating Text - Create floating text that reads (String((Custom value of (Triggering unit)))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
      • Trigger - Add to Count <gen> the event (Unit - A unit Starts the effect of an ability)
  • Count
    • Events
    • Conditions
    • Actions
      • -------- Elements Counting --------
      • Hashtable - Save 0 as 0 of (Key (Triggering unit)) in HElementCounts
      • Hashtable - Save 0 as 1 of (Key (Triggering unit)) in HElementCounts
      • Unit - Remove SphereQ1 from (Triggering unit)
      • Unit - Remove SphereQ2 from (Triggering unit)
      • Unit - Remove SphereQ3 from (Triggering unit)
      • Unit - Remove SphereW1 from (Triggering unit)
      • Unit - Remove SphereW2 from (Triggering unit)
      • Unit - Remove SphereW3 from (Triggering unit)
      • If ((Integer((Substring((String((Custom value of (Triggering unit)))), 1, 1)))) Equal to 1) then do (Unit - Add SphereQ1 to (Triggering unit)) else do (Do nothing)
      • If ((Integer((Substring((String((Custom value of (Triggering unit)))), 2, 2)))) Equal to 1) then do (Unit - Add SphereQ2 to (Triggering unit)) else do (Do nothing)
      • If ((Integer((Substring((String((Custom value of (Triggering unit)))), 3, 3)))) Equal to 1) then do (Unit - Add SphereQ3 to (Triggering unit)) else do (Do nothing)
      • If ((Integer((Substring((String((Custom value of (Triggering unit)))), 1, 1)))) Equal to 2) then do (Unit - Add SphereW1 to (Triggering unit)) else do (Do nothing)
      • If ((Integer((Substring((String((Custom value of (Triggering unit)))), 2, 2)))) Equal to 2) then do (Unit - Add SphereW2 to (Triggering unit)) else do (Do nothing)
      • If ((Integer((Substring((String((Custom value of (Triggering unit)))), 3, 3)))) Equal to 2) then do (Unit - Add SphereW3 to (Triggering unit)) else do (Do nothing)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If ((Integer((Substring((String((Custom value of (Triggering unit)))), (Integer A), (Integer A))))) Equal to 1) then do (Hashtable - Save ((Load 0 of (Key (Triggering unit)) from HElementCounts) + 1) as 0 of (Key (Triggering unit)) in HElementCounts) else do (Do nothing)
          • If ((Integer((Substring((String((Custom value of (Triggering unit)))), (Integer A), (Integer A))))) Equal to 2) then do (Hashtable - Save ((Load 1 of (Key (Triggering unit)) from HElementCounts) + 1) as 1 of (Key (Triggering unit)) in HElementCounts) else do (Do nothing)
      • Trigger - Add to RemoveAbilities <gen> the event (Unit - A unit Starts the effect of an ability)
      • Trigger - Add to AddFNova <gen> the event (Unit - A unit Starts the effect of an ability)
      • Trigger - Add to AddPowerCharge <gen> the event (Unit - A unit Starts the effect of an ability)
  • AddPowerCharge
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Load 1 of (Key (Triggering unit)) from HElementCounts) Equal to 3
        • Then - Actions
          • Unit - Add Power Charge (Invoker) to (Triggering unit)
          • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in HElementCounts
        • Else - Actions
  • RemoveAbilities
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 0 to 9, do (Actions)
        • Loop - Actions
          • Unit - Remove AbilArr[(Integer A)] from (Triggering unit)
 
Status
Not open for further replies.
Top