HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Creep Respawn Trigger

08-07-2006, 07:13 AM#1
Azhag
Okay, I have a problem.
The problem is, how do I make a respawn trigger, where it will respawn units over a 20-25 second period time.
If anyone has played Defiances ORPG, that is exactly how I want my respawn trigger to work, where you can kill many different types of units within the 20-25 time period, and it will still respawn each different unit within the time they have died, and the exact place where they were put on the map, etc. etc.

Any help will be greatly appreciated.
08-07-2006, 02:02 PM#2
Rising_Dusk
Easiest way with such a long wait is as follows.
Create a new trigger in the WE and use a death event.
Then perform a wait and recreate a unit of the same unit type at the position of the dead unit.

Notice that this may not be 100% accurate due to the unit not dying where you want the respawn to be.
You may need to use custom values or some such and orient them to specific coordinates on the map.

Trigger:
Collapse Events
Unit - A Unit Dies
Collapse Conditions
Unit - Unit is owned by player (your computer player)
//Add anyother conditions you want here
Collapse Actions
Custom Script - local unit s = GetDyingUnit()
Wait - Wait 25 gametime seconds
Unit - Create 1 unit of type (UnitType of s) at location (position of s) for owning player of s
Custom Script - set s = null
It'll look something akin to that.
08-07-2006, 03:13 PM#3
blu_da_noob
You won't be able to reference the local unit variable in the GUI action. You could just use the local-global trick (also leaks :>).
08-07-2006, 04:07 PM#4
Rising_Dusk
Heck, if it were me I'd do the whole thing in jass. :/
But yeah, you'd probably use the local global trick if you wanted gui.
08-07-2006, 07:40 PM#5
Azhag
So, how do I do this so it will create the unit where he was placed on the map?
Unfortunatly, I don't understand JASS, yet, and wouldn't know how to script it myself. I can probably do it, with some assistance though.
08-07-2006, 09:23 PM#6
Rising_Dusk
Custom Values.
Coordinate a custom value to a point on the map via some array or whatever.
Then recall that location based on the CV of the unit that dies.
08-07-2006, 09:34 PM#7
Alevice
You could generate them through a trigger since the beginning. Everytime you want to respawn, just call it again.