Monster Respawning

Komaqtion

You can change this now in User CP.
Reaction score
469
Something like this maybe ? :eek:
Trigger:
  • Region Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Region 1 <gen> contains (Triggering unit)) Equal to True
    • Actions
      • Wait 2.00 seconds
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Dylan8

New Member
Reaction score
2
Simple
Trigger:
  • Create
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 "Your Unit" for Player 1 (Red) at (Center of ("Your Region)) facing Default building facing degrees


Trigger:
  • Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to "Your Unit"
    • Actions
      • Wait 5.00 seconds
      • Unit - Create 1 "Your Unit for "You" at (Center of ("Your Region") facing Default building facing degrees
 

hagefade

New Member
Reaction score
1
What i have is that the the 38 spiders spawn at the centre of their own region when the map starts.

Trigger:
  • Monster Spawning
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 2 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 3 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 4 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 5 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 6 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 7 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 8 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 9 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 10 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 11 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 12 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 13 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 14 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 15 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 16 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 17 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 18 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 19 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 20 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 21 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 22 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 23 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 24 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 25 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 26 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 27 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 28 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 29 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 30 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 31 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 32 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 33 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 34 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 35 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 36 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 37 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 38 <gen>) facing Default building facing degrees


You both helped but I need it so it respawns back at the centre of the region where it spawned at the start.
 

Joccaren

You can change this now in User CP.
Reaction score
54
Create Point and unit variable arrays. Then, set the region and the unit in it to the variables. E.g:
The first spider you spawned would be YourUnitVariable[1] and the centre of the region you spawned it in YourPointVariable[1]

Then, when your event for respawn happens, create 1 unit of type (YourUnitVariable[1]) at (YourPointVariable[1]).

This way you would have to make separate triggers for each unit, there is an easier way of doing it but it, for some reason, escapes me.
 

hagefade

New Member
Reaction score
1
So for the region variable it would be the region. But for the spider variable do put it in the monster spawning at the start trigger? So straight after the create the spider, do I say set Spider[1] to last created unit?
 

Light Alkmst

New Member
Reaction score
20
Unless you're using heroes, creating an identical unit is usually easier and essentially the same as respawning a generic unit.
 

PrisonLove

Hard Realist
Reaction score
78
What i have is that the the 38 spiders spawn at the centre of their own region when the map starts.

Trigger:
  • Monster Spawning
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 2 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 3 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 4 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 5 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 6 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 7 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 8 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 9 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 10 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 11 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 12 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 13 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 14 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 15 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 16 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 17 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 18 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 19 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 20 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 21 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 22 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 23 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 24 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 25 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 26 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 27 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 28 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 29 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 30 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 31 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 32 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 33 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 34 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 35 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 36 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 37 <gen>) facing Default building facing degrees
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn 38 <gen>) facing Default building facing degrees


You both helped but I need it so it respawns back at the centre of the region where it spawned at the start.

I know you're not asking for this, but use a loop for this trigger, it will make your life much easier.

Set all the spawns into a variable array and do this.

Trigger:
  • For each integer A from 1 to 38 do actions
    • Loop - Actions
      • Unit - Create 1 Big Spider for Player 12 (Brown) at (Center of Spider Spawn[(Integer A)]) facing 270.00 degrees
 

Joccaren

You can change this now in User CP.
Reaction score
54
tick the 'array' box. Then just set the regions like I told you to. Then add in Prisonloves trigger
 

hagefade

New Member
Reaction score
1
kk, but I having troubles with the reviving.

Trigger:
  • Monster Reviving
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • (Triggering unit) Equal to Spider[(Integer A)]
    • Actions
      • Wait 5.00 seconds
      • Hero - Instantly revive Spider[(Integer A)] at (Center of Spider_Region[(Integer A)]), Hide revival graphics


What's wrong?
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Trigger:
  • (Triggering unit) Equal to Spider[(Integer A)]


I'm pretty sure that's the problem, but my experience lies in JASS, not GUI, so I may be wrong.
 

hagefade

New Member
Reaction score
1
I changed that, still doesn't work...

Trigger:
  • Monster Reviving
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Big Spider
    • Actions
      • Wait 5.00 seconds
      • Hero - Instantly revive Spider[(Integer A)] at (Center of Spider_Region[(Integer A)]), Hide revival graphics
 

hagefade

New Member
Reaction score
1
Ya but then I have to start my coding all over again. I just want my current coding to be fixed DX
 

Joccaren

You can change this now in User CP.
Reaction score
54
Your problem is that you are using 'Integer A' Randomly. It needs to be part of a loop. Try 'Spider 1' and create another trigger for 'Spider 2'. Lots of triggers and very time consuming but it will work.
 

hagefade

New Member
Reaction score
1
I put this but it still isn't working =(

Trigger:
  • Spider 1
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • (Triggering unit) Equal to Spider[1]
    • Actions
      • Wait 5.00 seconds
      • Hero - Instantly revive Spider[1] at (Center of Spider_Region[1]), Hide revival graphics
 

Happy

Well-Known Member
Reaction score
71
use these 2 triggers:

Trigger:
  • Your Trigger
    • Events
      • Unit - A unit dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Owner of (Triggering unit)) equal to Player 12 (Brown)
        • 'THEN'-Actions
          • Countdown-Timer - Start (your timer) as a nonrecurring timer that will expire in 5.00 seconds
        • 'ELSE'-Aktionen
          • Do nothing


Trigger:
  • your trigger 2
    • Events
      • Timer - (your timer) expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 38, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • (Number of units in (Units in (area(Integer A)) matching ((Unit-type of (Matching unit)) equal to Spider))) equal to 0
            • 'THEN'-Actions
              • Unit - Create 1 Spider for Player 12 (Brown) at (Center of (area (Integer A))) facing ....
            • 'ELSE'-Actions
              • Do nothing


this way round every 5 seconds every dead spider gets revived.....

i hope it helps....

greetz happy
 

hagefade

New Member
Reaction score
1
Ya but, eg:
0 sec: Spider 1 is killed, timer starts.
4 sec: Spider 2 is killed.
5 sec: Spider 1 And Spider 2 Respawn.

Does that happen since it's using the same timer?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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