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,463
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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top