HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Global Creep Repawn Question

03-26-2005, 04:54 PM#1
Das Jank
Ok I have a Epic sized map thats going to be an RPG and on it are lots or creeps and stuff. Im not sure how to do this but is there a way to make them respawn one minute after there death in the same spot they were originally in when the game started? The only way I can think of to do this is to individually select each creep and creat a region for each one to respawn. I remember a while back there was a contest to creat triggers for something like this but how would I set up a global variable array for all the units and then have it respawn the unit at its original spot?
03-26-2005, 05:00 PM#2
iNfraNe
well, if you know of the contest, why dont you download the winner? ^_^

what I think he did (dont remember) was loop trough all units using all units in playable map unit group, and he added them in an array, and put their starting points in a paralel array. Then when a unit dies loop from 1 till the end of the array, and when dying unit = unitinthearray then revive him at the pointarray[hisnumber] after some wait.
03-26-2005, 05:05 PM#3
Das Jank
Well I remember the contest but im not sure where to find a place to download the map, not even sure if the post still exists.
03-26-2005, 05:26 PM#4
iNfraNe
http://www.wc3campaigns.com/showthread.php?t=58751
03-27-2005, 04:02 AM#5
Raptor--
if u use a gamecache you can cut down the amount of 'wasted' array searching by simply assigning coordinates for respawn directly to the unit itself (via handles)

i mean same results, u just don't have to go looking through an array needless amounts of times, u just go (in OOP format):
XofRespawn = (dying unit).var_initX
YofRespawn = (dying unit).var_initY
respawn unit at point(XorRespawn, YofRespawn)
03-27-2005, 11:02 AM#6
iNfraNe
yea but that needs jass ;)
03-27-2005, 11:49 AM#7
divine_peon
uhh... no. it does not need jass.
03-27-2005, 12:24 PM#8
iNfraNe
Quote:
Originally Posted by divine_peon
uhh... no. it does not need jass.
then tell me, how would u label the unit in the game cache?
without H2I that is (without jass...).
03-27-2005, 05:53 PM#9
Raptor--
Quote:
Originally Posted by toot
then tell me, how would u label the unit in the game cache?
without H2I that is (without jass...).

u don't :p, hes on crack, u need jass :p

well, technically u could use custom script action, but does that count as jass or gui? or 'jui'
03-27-2005, 08:13 PM#10
divine_peon
Quote:
Originally Posted by toot
then tell me, how would u label the unit in the game cache?
without H2I that is (without jass...).
uhh, use a for loop. :D
03-27-2005, 08:21 PM#11
weaaddar
No you really need jass there is no way your going to get the units address (Handle) without jass. That said Reviver 2.0 should be suffeciently modifiable. My winning entry used gamecache and one intensive unit search in game load time. I would low ball it and say my search can handle around 1000 units before crashing its thread.

All neutral hostile units not placed via worldedit, will revive, BUT will not revive at thier original position (how would the code know what it was?) instead they will revive at the center of the map. My code will only revive creeps or creep heroes.

The code also revives items, but simmilar stipulations apply. Only, those placed during map init. All items created in game via triggers or otherwise will simply die and remain dead. Only creeps have a problem, I haven't tested but it might suck for summons oh well :/
03-27-2005, 08:27 PM#12
iNfraNe
well that shouldnt be too big of a problem adding a little boolean condition...