• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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