Help with making creeps respawn where they originally spawned

Stubal

New Member
Reaction score
0
Hello! ive been making a map and i figured out how to make creeps respawn but they keep respawning on top of their dead bodies...may someone please give me the trigger or commands to fix this =/

the trigger for respawning i have been using is
Event
Unit - A unit owned by Player 9 (Gray) Dies
Action
Wait 10 seconds
Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The new unit's default life and mana
Unit - Rescue (Triggering unit) for Player 9 (Gray) and Retain color
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Instead of the last two actions just have create 1 triggering unit at centre of region unit facing defaul building degrees. And create a region where they spawn so it can be created in the centre of that region
 

Stubal

New Member
Reaction score
0
This works but what would i have to do exactly to make the creeps respawn in several different locations?

Im lookin for an angel arena type of respawn trigger if you can help me out with that pls.. Thanks =P

Oh and does anyone kno how a trigger to make a unit i customized to be max lvl on map that drops a certain item spawn with the same item and lvl?
 

jak3u

New Member
Reaction score
0
Hello! ive been making a map and i figured out how to make creeps respawn but they keep respawning on top of their dead bodies...may someone please give me the trigger or commands to fix this =/

the trigger for respawning i have been using is
Event
Unit - A unit owned by Player 9 (Gray) Dies
Action
Wait 10 seconds
Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The new unit's default life and mana
Unit - Rescue (Triggering unit) for Player 9 (Gray) and Retain color

How 'bout instead of "replace", you "remove" the triggering unit first and then replace it with another triggering unit?
 

Stubal

New Member
Reaction score
0
well...the trigger works but my problem is still that i cant figure out how to make a unit owned by player 9 gray respawn in multiple locations...without the creeps overflowing =/
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
use this trigger:
Trigger:
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 9 (Gray)) and do (Actions)
        • Loop - Actions
          • Set TempInteger = (TempInteger + 1)
          • Unit - Set the custom value of (Picked unit) to TempInteger
          • Set TempPoint[(Custom value of (Picked unit))] = (Position of (Picked unit))

to save the position of every unit owned by player 9 gray at map initialization
and use this trigger:
Trigger:
  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at TempPoint[(Custom value of (Triggering unit))] facing Default building facing (270.0) degrees

to respawn them at the position saved in the first trigger.
this needs the custom value of your creeps as well as a point variable with array and an integer variable.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Make a region where you want them to spawn then spawn them there
 

LordXavier

TH.net Regular
Reaction score
16
why don't you make this simple on yourself, download Ryoko Heroes, Creeps, and Items 2 from here and then copy and paste the creep revival triggers into your map. The first one saves the location of all units on the map and the second respawns them after X amount of time (you can easily change) in their original starting location. PLUS it is MUI so it holds locations for any unit you want (default is only for Neutral Hostile)
 

Stubal

New Member
Reaction score
0
why don't you make this simple on yourself, download Ryoko Heroes, Creeps, and Items 2 from here and then copy and paste the creep revival triggers into your map. The first one saves the location of all units on the map and the second respawns them after X amount of time (you can easily change) in their original starting location. PLUS it is MUI so it holds locations for any unit you want (default is only for Neutral Hostile)

So i just used this but im having trouble with the custom text..I am not allowed to enable the trigger because im not putting in the proper name for "player 9 grey" does anyone kno what the text is supposed to be for

call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_9_(Grey))
 

Stubal

New Member
Reaction score
0
ehm =/ i figured it out..but now this trigger from ryokos map isnt working for me =/ i used the exact same trigger for location and respawn =// all i changed was 60 seconds to 15 and neutral aggressive to Player (9)
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
@Stubal: Does that even syntax? An event hasn't been applied to it, and what's 'PLAYER_9_(Grey)' anyway. If you want a vJass version of creep version I can show you the snippet Jesus4Lyf made to go along with his AIDS system, though it requires two libraries, Key Timers 2 and AIDS (Advanced Indexing and Data Storage).
 

Stubal

New Member
Reaction score
0
well i only pasted wut i thought needed correcting in the statement in the trigger this is what i have in the respawn trigger im praying will work by the end of today...

function Trig_Revive_Creeps_Actions takes nothing returns nothing
local integer CUSTOM
set CUSTOM = GetUnitUserData(GetDyingUnit())
call TriggerSleepAction( 15.00 )
call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(9), udg_Creep_Position[CUSTOM], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction

//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
set gg_trg_Revive_Creeps = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(9), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Well, where was 'CUSTOM' set?
 

Stubal

New Member
Reaction score
0
to be honest with u im not sure at all...what do i need to set 'CUSTOM' as? =/ sry im semi-new to this
 

wc3shady

You can change this now in User CP.
Reaction score
40
So I'm not the best triggerer and I only know GUI but if you wanted them to spawn in different areas couldnt you just make separate regions for each respawn area, put them all in a variable each with an array, then run a trigger when they die that picks a number 1 through # (however many regions you have for them to spawn in) and then set that number to an integer variable, then check the integer variable and if its value is 1 respawn them in region 1 if its 2 respawn them in region 2 and so on.
 

Stubal

New Member
Reaction score
0
So I'm not the best triggerer and I only know GUI but if you wanted them to spawn in different areas couldnt you just make separate regions for each respawn area, put them all in a variable each with an array, then run a trigger when they die that picks a number 1 through # (however many regions you have for them to spawn in) and then set that number to an integer variable, then check the integer variable and if its value is 1 respawn them in region 1 if its 2 respawn them in region 2 and so on.

ok ok ok....hold up this is perfect lol...can u get me the exact triggers id need to do this? its rlly simple and exactly what i want O.O i would REALLY appreciate it
 

vypur85

Hibernate
Reaction score
803
Code:
Init
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by Player 9 (Gray)) and do (Actions)
            Loop - Actions
                Set TempInteger = (TempInteger + 1)
                Unit - Set the custom value of (Picked unit) to TempInteger
                Set TempPoint[(Custom value of (Picked unit))] = (Position of (Picked unit))

Code:
Respawn
    Events
        Unit - A unit Dies
    Conditions
        Owner of (Triggering unit) Equal to Player 9 (Grey)
    Actions
        [B]Wait 15.00 game-time seconds[/B]
        Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at TempPoint[(Custom value of (Triggering unit))] facing Default building facing (270.0) degrees


Can't the code in Post#6 help you? It should be workable.
 

Stubal

New Member
Reaction score
0
he said i needed a custom value of my creeps as well as a point variable with array and an integer variable, which i'm not quite 100% sure how to do so i didn't give it a shot =/ care to help? like i said in an earlier post im quite new to this =/
 

vypur85

Hibernate
Reaction score
803
Just follow the trigger provided.....

All you need is one Point variable. In trigger editor, you can see an 'X' button at the top (can't remember the shortcut key). That's the 'Variable editor'. Click that, create a point variable, with array of say, 10. And then create another Integer variable.

Variable name: TempPoint
Variable type: Point
Array: Tick this. And set the number to 10 (number doesn't really matter).

Variable name: TempInteger
Variable type: Integer

Then build up the trigger. That's all.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top