HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Respawning anti-lag question

07-29-2004, 10:47 PM#1
Thrall_89
Hey, just got a fairly simple question thats been bugging me lately. I have a Creep respawn trigger for my map (easy enough to make) but I was just wondering if anyone knew how to set it so that it would simply revive the dead creep instead of replacing it? Because that would help reduce the lag in the map. Heres the trigger as it currently is:

Revive Creep
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
Actions
Wait 40.00 game-time seconds
If ((Number of units in (Units within 425.00 of (Position of (Dying unit)) matching (((Owner of (Matching unit)) controller) Equal to User))) Equal to 0) then do (Unit - Replace (Dying unit) with a (Unit-type of (Dying unit)) using The new unit's max life and mana) else do (Trigger - Run (This trigger) (ignoring conditions))


PS I highlighted the area that actually handles the replacement of the creep.
07-29-2004, 11:07 PM#2
HomerTheDragoon
Quote:
Originally Posted by Thrall_89
Hey, just got a fairly simple question thats been bugging me lately. I have a Creep respawn trigger for my map (easy enough to make) but I was just wondering if anyone knew how to set it so that it would simply revive the dead creep instead of replacing it? Because that would help reduce the lag in the map. Heres the trigger as it currently is:

Revive Creep
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
Actions
Wait 40.00 game-time seconds
If ((Number of units in (Units within 425.00 of (Position of (Dying unit)) matching (((Owner of (Matching unit)) controller) Equal to User))) Equal to 0) then do (Unit - Replace (Dying unit) with a (Unit-type of (Dying unit)) using The new unit's max life and mana) else do (Trigger - Run (This trigger) (ignoring conditions))


PS I highlighted the area that actually handles the replacement of the creep.

mayb create unit ad dying unit? that might b less idk...
07-29-2004, 11:17 PM#3
Vexorian
it is impossible to revive non-heroes unless you use ressurection which is difficult to control, you just need to stop the leaks actually, check the tutorials section and find Cubasis' memory leak tutorial
07-29-2004, 11:25 PM#4
Eeporgorg
Quote:
Originally Posted by Thrall_89
Hey, just got a fairly simple question thats been bugging me lately. I have a Creep respawn trigger for my map (easy enough to make) but I was just wondering if anyone knew how to set it so that it would simply revive the dead creep instead of replacing it? Because that would help reduce the lag in the map. Heres the trigger as it currently is:

Revive Creep
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
Actions
Wait 40.00 game-time seconds
If ((Number of units in (Units within 425.00 of (Position of (Dying unit)) matching (((Owner of (Matching unit)) controller) Equal to User))) Equal to 0) then do (Unit - Replace (Dying unit) with a (Unit-type of (Dying unit)) using The new unit's max life and mana) else do (Trigger - Run (This trigger) (ignoring conditions))


PS I highlighted the area that actually handles the replacement of the creep.

First, you should create your units using
Code:
 For Each Integer A, Create 1 [CreepUnit] at [CreepSpawn] facing Default Building Degrees

Set Variable Creep1(Integer A) = Last Created Unit

Then, Try this
Code:
[color=Green]Events[/color]
A unit owned by Neutral Hostile Dies.
[color=Green]Conditions[/color]
(All units of (Units within 512.00 of (Center of (Playable map area))) are dead) Equal to True
[color=Green]Actions[/color]
For each integer A, Do actions
            Loop Actions-
                        Replace Creep1(Integer A) With Unit-Type of Creep1(Integer A) using the new unit's life and mana
                        Set Variable Creep1(Integer A) = Last Replaced Unit


That Should work, If it doesn't, I'm really Sorry :(
07-30-2004, 04:47 AM#5
Thrall_89
ok, yea I figured as much about the revive thing... didn't see much options in that. Ill go cruise around to help reduce leak.