Creep Respawn help

DarkSky

New Member
Reaction score
0
So I have a problem with a creep respawn trigger..and I don't understand why it isn't working. I followed the tutorial on it exactly, at least it seems like it to me.
Can anyone help me figure out my problem? I'd appreciate it.

Trigger 1
trigger1z.png


Trigger2
trigger2.png


Variables
variables.png


Oh, the problem is: the creeps don't respawn. IE: nothing happens.
 

KillingSpree

New Member
Reaction score
7
The creeps don't respawn because of the wait-action.
The world editor "forgets" what the triggering unit was after an wait-event.

Before the wait, set a unit-variable to Dying Unit, then add the wait,
and add the Create Unit action, creating a "unit-type of type (UnitVar)"

trigger:

Trigger:
  • Creep Respawn
    • Events
    • Conditions
    • Actions
      • Set YourUnit = (Dying unit)
      • Wait 35.00 seconds
      • Unit - Create 1 (Unit-type of YourUnit) for Neutral Hostile at (Center of (Playable map area)) facing Default building facing degrees
 

avalya

New Member
Reaction score
37
If you'd do that, you'd have a pain with multiple units (it's creeps!) so making that MUI... I'd rather not, go with triggering unit, I couldn't find a problem in your trigger, but then again, I didn't look over it too much since I've gotta run to my next class in a couple of minutes. :p
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
If you've got some action there when reviving the unit, why not use the coordinates you saved? :p

It should look something like "create unit for some player at Point(CreepX, CreepY) with no offset". No offset is needed since you have the exact X and Y needed.
 

millz-

New Member
Reaction score
25
Actually, I may know why it does not respawn for you. I've see the same problem in my map before. If your "wait" duration is longer than your "bone decay" duration in your gameplay constants, your respawn will not work, if you used wait. Triggering unit works after waits, but it does not work if the unit is decayed before it is being used (this is as far as I know, because it happened to me).
 

DarkSky

New Member
Reaction score
0
If you've got some action there when reviving the unit, why not use the coordinates you saved? :p

It should look something like "create unit for some player at Point(CreepX, CreepY) with no offset". No offset is needed since you have the exact X and Y needed.

alright. I did that. while it doesn't help my problem, it makes sense that I didn't need an offset. I was just following the tutorial.
 

DarkSky

New Member
Reaction score
0
Actually, I may know why it does not respawn for you. I've see the same problem in my map before. If your "wait" duration is longer than your "bone decay" duration in your gameplay constants, your respawn will not work, if you used wait. Triggering unit works after waits, but it does not work if the unit is decayed before it is being used (this is as far as I know, because it happened to me).

aha! that's it. I had the decay time very low. so that would explain it. thank you very much; I've remade this trigger several times trying to figure out what was wrong.

testing with longer decay time.

EDIT: works now. thank you! and sorry for double post. got a tad excited.
 

LearningCode

New Member
Reaction score
24
Why not have a trigger that removes the "dead" body?
It decreases the lag, I believe

Like:
Trigger:
  • Trigger
    • Events
      • Unit owned by Player (Neutral Hostile) dies
    • Conditions
    • Actions
      • Wait 4.00 seconds
      • Unit - Remove (dying unit) from the game


That way, you don't have to set all the (potentially) thousands of creeps' decay time.
It'll be troublesome to fiddle with the object editor for all the creeps when there is an easier solution, no?
 

DarkSky

New Member
Reaction score
0
Why not have a trigger that removes the "dead" body?
It decreases the lag, I believe

Like:
Trigger:
  • Trigger
    • Events
      • Unit owned by Player (Neutral Hostile) dies
    • Conditions
    • Actions
      • Wait 4.00 seconds
      • Unit - Remove (dying unit) from the game


That way, you don't have to set all the (potentially) thousands of creeps' decay time.
It'll be troublesome to fiddle with the object editor for all the creeps when there is an easier solution, no?


Hmmm. I tried this, but they didn't revive...
 

Ayanami

칼리
Reaction score
288
It's because when you remove the dead unit, there is no "dead unit" for it to refer to in your revive trigger.
 

millz-

New Member
Reaction score
25
Because, in my map, I wanted the decay time to be much shorter than the respawn duration as well, so I wrote my own respawning system. I know it may be quite badly written, and uses a game cache (because in my map I use the same game cache to store loads of stuff). But anyways, if you ever wanna try it, here it is. Simply copy the only trigger in the map over to your map, and read the top (it's written in JASS). :cool:

What it does:
-Saves unit position
-Saves unit facing angle
-Respawn time can be a fixed number for every single creep, or based on its point value (set in object editor)
 

Attachments

  • CreepRespawn.w3x
    19.5 KB · Views: 194
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top