• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Item Respawn

Status
Not open for further replies.
Level 3
Joined
Jul 17, 2012
Messages
26
I'm trying to make an inventory item respawn on the map here's what I have:

TRIGGER
Unit - Any Unit Picks Up Item (Inventory) - Medkit [45.55, 62.53]
CONDITION
General - Wait 600.0 Game Time seconds
ACTION
Unit - Create 1 Item (Inventory) - Medkit for player 0 at Medkit 1 facing (Map Center offset by (0.0, 0.0)) (No Options)

The problem is the Trigger. I want the medkit to respawn 10m after EVERY time it's picked up (I have 2 medkits in different locations).
I thought of just having it as a periodic event (every 10m of gametime have one spawn in each location), but I don't want them to pile up if they don't get used. Is there a condition that will prevent one from spawning if there is still one there?
 
items are units and if you like to know if it has been used you can check with trigger (there is a condition on integers - number of units). if you like to know if medkit 1 or medkit 2 i would add a custom value on the medkit and compare it. best thing to respawn the item would be a timer which starts after the medkit is picked up and restarts if it is still there.
 
^ Hashtables? Are you sure you are posting in the correct game section?

Is there a condition that will prevent one from spawning if there is still one there?

Yes just use the If Then Else or simply the condition:

(Number of Living units in (Item - Medkit units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) < 1

then create, Options (ignore placement requirements) - for just in case
 
Status
Not open for further replies.
Back
Top