• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Creeps dont Respawn after Raise Dead

Status
Not open for further replies.
Level 3
Joined
Apr 7, 2009
Messages
25
Currently, I am using the following triggers to have the enemies in my orpg to respawn. However, when the dead enemies are raised as skeletons (via raise dead), they don't respawn. Is this a problem with the trigger or the spell itself?
  • Untitled Trigger 003
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Set Temp_Integer = (Temp_Integer + 1)
      • Unit - Set the custom value of (Triggering unit) to Temp_Integer
      • Set Creep_Point[Temp_Integer] = (Position of (Triggering unit))
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
      • (Custom value of (Triggering unit)) Greater than 0
    • Actions
      • Wait Respawn_Time seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Player 11 (Dark Green) at Creep_Point[(Custom value of (Triggering unit))] facing 270.00 degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
 
Level 3
Joined
Apr 7, 2009
Messages
25
Oh, yea. Forgot to list that.
  • Respawns
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Respawn_Time = 60.00
      • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green)) and do (Actions)
        • Loop - Actions
          • Set Temp_Integer = (Temp_Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Temp_Integer
          • Set Creep_Point[Temp_Integer] = (Position of (Picked unit))
 
Level 13
Joined
Sep 29, 2008
Messages
671
maybe its because of the very long wait that makes it not respawn. There are limits to decaying corpse on the map and also have time that they will disappear and the variable will be null. I had this problem before so here is what I did:

  • Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green)) and do (Actions)
    • Loop - Actions
      • Set Temp_Integer = (Temp_Integer + 1)
      • Set Creep_Point[Temp_Integer] = (Position of (Picked unit))
      • Set Creep_Type[Temp_Integer] = (Unit-type of (Picked unit))
      • Set Creep_Unit[Temp_Integer] = (Picked unit)

  • Creep Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • For each (Integer A) from 1 to Temp_Integer, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Creep_Unit[(Integer A)] is alive) Equal to False
            • Then - Actions
              • Unit - Create 1 Creep_Type[(Integer A)] for Neutral Hostile at Creep_Point[(Integer A)] facing (Random angle) degrees
              • Set Creep_Unit[(Integer A)] = (Last created unit)
            • Else - Actions
I can't remember if that was how I did it. I don't have the trigger anymore. xD

But I don't think this will work for you.since your ressurecting them one by one and respawn them with a very long wait time, right?
 
I dont think the "Unit enters playable map" trigger registers to units being created.
Also I dont think when a summoned unit with an expiration timer (such as a skeleton created by raise dead) registers as "dying" when the expiration timer runs out.
When I do things like this, I place my units with integer values. I'll give you an easy example. I have a room that contiains 3 bandits, all placed in the world editor.
Make an integer variable called NumberBandits and set the value to 3
Make a unit [array] variable called Bandit.
Set each bandit to the variable. One is Bandit [1], two is Bandit [2], and three is Bandit [3].
When a unit of type ((bandit)) dies, checking if it is Bandit [1-3], set NumberBandits to (NumberBandits = (NumberBandits-1)). Have a periodic trigger that checks if NumberBandits is less than 3. If it is, create a Bandit, set that bandit to the unit array, and then set (NumberBandits = (NumberBandits+1))

In your case, you could say..
Unit owned by (neutral hostile) casts ability
Ability being cast = Raise dead
Set (Last Created Unit) to equal Skeleton [1]
Set NumberSkeletons to equal NumberSkeletons+1

If NumberSkeletons is less than 3, Run this trigger. or somethjing like that.
If Skeleton [1-3] dies or expires, set NumberSkeletons to equal NumberSkeletons-1.


I hope this helps. It may be a bit confusing, but it should work without a doubt. You could also make another variable for the max number of skeletons, that way you could increase or decrease the number you want throughout the game. Then your If Then Else function would look like this..
If
NumberSkeletons is less than MaxNumberSkeletons
Then
(blah blah blah)
 
Level 3
Joined
Apr 7, 2009
Messages
25
I'm going to try that out nerovesper, but it the creeps have always been respawning. Its not a matter of the corpse being there. I think its more a matter of the corpse being manipulated. Only the creeps raised as skeletons don't respawn.

I tried it out.. for some reason it spawns an extra unit every time.
 
Level 3
Joined
Apr 7, 2009
Messages
25
I dont think the "Unit enters playable map" trigger registers to units being created.
Also I dont think when a summoned unit with an expiration timer (such as a skeleton created by raise dead) registers as "dying" when the expiration timer runs out.

I think you are getting the wrong idea about the problem.
I want to mention that this is an orpg. The skeletons are summoned by the players, and are not meant to be revived. Heres an example of the problem.

Player1 is fighting 3 gnolls. He kills one gnoll, and uses raise dead. That gnolls corpse is now a skeleton. PLayer 1 kills the other 2 gnolls. After 60 seconds (My respawn timer) only the last 2 gnolls that were killed respawn. The gnoll whose corpse became a skeleton doesn't respawn.

EDIT- I did a little more testing on this. Units that don't leave a corpse (They just disappear after the death animation) continue to respawn after being raised as skeletons. The units that leave a corpse are the ones that don't respawn after being raised as skeletons.
 
I think you are getting the wrong idea about the problem.
I want to mention that this is an orpg. The skeletons are summoned by the players, and are not meant to be revived. Heres an example of the problem.

Player1 is fighting 3 gnolls. He kills one gnoll, and uses raise dead. That gnolls corpse is now a skeleton. PLayer 1 kills the other 2 gnolls. After 60 seconds (My respawn timer) only the last 2 gnolls that were killed respawn. The gnoll whose corpse became a skeleton doesn't respawn.

So do what I said. Set an integer for the number of knolls. Each time one dies, set the integer a number lower.
The trigger will check the integer, and if it is lower than the maximum integer, create the knolls. it's leak-free.
 
Level 3
Joined
Apr 7, 2009
Messages
25
*Face palms self* :bored:

Agh, I'm sorry. Let me try that out now.

I tried it out. Heres the trigger I used.


  • Hmm
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Rabid Wolf
          • (Unit-type of (Triggering unit)) Equal to ?????
          • (Unit-type of (Triggering unit)) Equal to Black Paw
          • (Unit-type of (Triggering unit)) Equal to The Headhunter
          • (Unit-type of (Triggering unit)) Equal to Weak Earth Elemental
          • (Unit-type of (Triggering unit)) Equal to Gnoll Brute
          • (Unit-type of (Triggering unit)) Equal to Gnoll High Seer
          • (Unit-type of (Triggering unit)) Equal to Gnoll Warlord
          • (Unit-type of (Triggering unit)) Equal to Gnoll Underling
          • (Unit-type of (Triggering unit)) Equal to Gnoll Assassin
          • (Unit-type of (Triggering unit)) Equal to Gnoll Poacher
          • (Unit-type of (Triggering unit)) Equal to Gnoll
          • (Unit-type of (Triggering unit)) Equal to Gnoll Seer
          • (Unit-type of (Triggering unit)) Equal to Gnoll Warrior
          • (Unit-type of (Triggering unit)) Equal to Gnoll Sniper
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NumberGnolls Less than 70
        • Then - Actions
          • Wait Respawn_Time seconds
          • Unit - Create 1 (Unit-type of (Triggering unit)) for Player 11 (Dark Green) at Creep_Point[(Custom value of (Triggering unit))] facing 270.00 degrees
        • Else - Actions
          • Set NumberGnolls = (NumberGnolls - 1)

Same problem as before. The creeps respawn just as they did before, but the ones that left a corpse and were raised as skeletons don't respawn. Maybe I did something wrong?
 
Status
Not open for further replies.
Top