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.
 
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
 
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
 
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.
 
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).
 
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.
 
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.
 
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?
 
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...
 
It's because when you remove the dead unit, there is no "dead unit" for it to refer to in your revive trigger.
 
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: 198
General chit-chat
Help Users
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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