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

Simple respawn for my needs

Status
Not open for further replies.
Level 15
Joined
Nov 26, 2005
Messages
1,151
Listen, I am making a "troll tribes" kind of map ... anyway, many things are finished, but still I need to figure out a small issue:
I need to find an easy way to respawn 4 types of units (Stone deposit, Iron deposit, Mithril deposit and Copper deposit). What I need is a short way to make them re-appear every 5 minutes at the exact place where they were placed in the World Editor
Please help me.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Unit dies, condition: triggering unit equal to deposit, wait 300 seconds, set temppoint = (Position of triggering unit), create 1 unit-type of triggering unit at temppoint for owner of triggering unit, call RemoveLocation(udg_temppoint)

the reason why you should use triggering unit is, because it's saved local means it can be used after waits
 
Level 13
Joined
Jan 18, 2008
Messages
956
I thought about something similar as you Squiggy, but does this trigger work with items?
 
Level 9
Joined
Jun 26, 2007
Messages
659
It won't ... because if another deposit of the same type dies before this one is revived, it will start the trigger again...
trigger can be use several time simultaneously
Squiggy's one will works perfectly if temppoint is a local variable ;)
(add as first action in the trigger "Custom Script : local location udg_temppoint" to make it local = one for each use of the trigger)
 
Status
Not open for further replies.
Top