• 🏆 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!

Will this leak or cause any problems?

Status
Not open for further replies.
  • RuneXP
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Rune of Experience
    • Actions
      • Set TempPoint3 = (Position of (Triggering unit))
      • Set Group = (Units within 1000.00 of TempPoint3)
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is A Hero) Equal to True
              • (Level of TempUnit) Less than 10
              • (TempUnit belongs to an ally of (Owner of (Triggering unit))) Equal to True
              • (TempUnit is alive) Equal to True
            • Then - Actions
              • Hero - Create Tome of Experience and give it to (Picked unit)
            • Else - Actions
      • -------- We remove the leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint3)
      • Custom script: call DestroyGroup(udg_Group)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Owner of Triggering Unit can always be replaces with "Triggering Player" in Generic events.

A way to improve this is using locals and custom scripts to avoid some BJ's.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Owner of Triggering Unit can always be replaces with "Triggering Player" in Generic events.

A way to improve this is using locals and custom scripts to avoid some BJ's.

Why would you want to avoid BJ's? :ogre_hurrhurr:

That "triggering player" thing will be super handy. I didn't know I could use it for unit events.
 
Status
Not open for further replies.
Top