• 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.

[Solved] Do these two triggers leak?

Status
Not open for further replies.
Level 9
Joined
Mar 2, 2014
Messages
160
  • Tower carpture
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A structure) Equal to True
    • Actions
      • Set dyingunit = (Dying unit)
      • Unit - Replace (Dying unit) with a (Unit-type of (Dying unit)) using The new unit's max life and mana
      • Unit - Change ownership of (Last replaced unit) to (Owner of (Killing unit)) and Change color
and this one:

  • Basic army train
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Basic Army All
    • Actions
      • Unit - Create 12 (Random level 1 creep unit-type) for (Owner of (Trained unit)) at (Position of (Trained unit)) facing Default building facing degrees
      • Unit - Remove (Trained unit) from the game
I managed to understand almost everything in W3 editor, but I am still lost in leaks (and yes have read all tutorials I am just leak dumb)

Thanks for help!
 
Last edited:
Level 11
Joined
Jan 23, 2015
Messages
788
The second one does at (Position of (Trained unit))

Make this:
  • Basic army train
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Basic Army All
    • Actions
      • Set TempPoint = (Position of (Trained unit))
      • Unit - Create 12 (Random level 1 creep unit-type) for (Owner of (Trained unit)) at TempPoint facing Default building facing degrees
      • Unit - Remove (Trained unit) from the game
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top