| 03-26-2005, 04:54 PM | #1 |
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 |
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 |
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 |
| 03-27-2005, 04:02 AM | #5 |
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 |
yea but that needs jass ;) |
| 03-27-2005, 11:49 AM | #7 |
uhh... no. it does not need jass. |
| 03-27-2005, 12:24 PM | #8 | |
Quote:
without H2I that is (without jass...). |
| 03-27-2005, 05:53 PM | #9 | |
Quote:
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 | |
Quote:
|
| 03-27-2005, 08:21 PM | #11 |
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 |
well that shouldnt be too big of a problem adding a little boolean condition... |
