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

[Solved] Do these two triggers leak?

Status
Not open for further replies.
Level 8
Joined
Mar 2, 2014
Messages
132
  • 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