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)
 
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.
 
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.
Back
Top