• 🏆 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!

[Trigger] Respawn with Regions

Status
Not open for further replies.
Level 1
Joined
May 15, 2007
Messages
88
(Still not resolved - Removing this when I get it to work)
(Map is an Escape map)
The units won't respawn if they die.


Firstly, this my respawn system, which won't work when unit gets hit by the periodic thrown rock by the turtle.

  • Red Copy Copy 9 Copy 4
    • Events
      • Unit - A unit enters Checkpoint <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Region - Center Region 1043 <gen> on (Position of (Triggering unit))
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Triggering unit)) over 1.00 seconds
Every player got a trigger like this, this saves the current checkpoint by moving a player specific(each player got one) region to the position of the checkpoint.

Heres what happens if an unit dies:
  • Respawn_Red
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to WannabeSmartie
      • ((Owner of (Triggering unit)) Current lumber) Greater than 50
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current lumber) Greater than 50
          • (Unit-type of (Triggering unit)) Equal to WannabeSmartie
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + ,Your unit will respawn in 10 seconds)
          • Wait 10.00 seconds
          • Unit - Create 1 WannabeSmartie for (Owner of (Triggering unit)) at (Random point in Region 1043 <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to RestartGroup
          • Unit Group - Add (Last created unit) to UnitGroup
        • Else - Actions
          • Do nothing
*Lumber is the lives of a player, they start with 500, when it gets to 50 or below, they can't respawn anymore.
*WannabeSmartie is the unit the players control.


Below is a description of the area where the unit won't respawn if killed(By Siege rock, 1 hit kill)

Turtle.JPG


The turtle closest to text attacks with a siege attack every 3 sec at region 3.
For some reason, units won't respawn if killed by Siege (Since they explode)
So I made a trigger specifically for this to respawn unit at the start of that challenge
  • Respawnt
    • Events
      • Unit - A unit enters 3 <gen>
    • Conditions
    • Actions
      • Wait 5.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((1 <gen> contains (Triggering unit)) Equal to True) or ((2 <gen> contains (Triggering unit)) Equal to True)
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Wait 10.00 seconds
          • Unit - Create 1 WannabeSmartie for (Owner of (Triggering unit)) at (Center of ContStartup <gen>) facing Default building facing degrees

Problem is, it won't work.

(ContStartup is the start of that challenge)
 
Last edited:
Level 6
Joined
Jun 30, 2006
Messages
230
Well, mate, I can't tell you why it doesn't work, but you have a leak when you create your WannabeSmartie. I'm not on a computer with Warcraft at the moment, but you need to make a variable for ContStartup, and another variable for Center of Contstartup, then use the variable instead of "Center of ContStartup <gen>". Remove the locations when you are done with them.
 
Level 5
Joined
Jul 11, 2007
Messages
152
I'm not sure what you're asking here. Do you want units to spawn as the turtle attacks or do you want the turtle to attack ground at that location...?
 
Level 6
Joined
Aug 16, 2007
Messages
213
Firs of all remove ''do nothing'' action, and put actions in ''else actions'' to ''then actions'' than delete else actons.<----and it still wont work.

Events:
-unit enters 3
Conditions:
-/
Actions:
-order ''turtle'' to attack (point) region 3

Events:
-unit leaves rect 3
Conditions:
-/
Actions:
-order turtle to stop

Set turtle attack type to splash, attack cooldown 3 seconds

This might help alitle.
 
Level 1
Joined
May 15, 2007
Messages
88
Try changing it from if unit enters region to if unit explodes?

There IS no trigger like that ;)

Firs of all remove ''do nothing'' action, and put actions in ''else actions'' to ''then actions'' than delete else actons.<----and it still wont work.

Events:
-unit enters 3
Conditions:
-/
Actions:
-order ''turtle'' to attack (point) region 3

Events:
-unit leaves rect 3
Conditions:
-/
Actions:
-order turtle to stop

Set turtle attack type to splash, attack cooldown 3 seconds

This might help alitle.




The turtle attack is already set. It attacks every third second.
I want the trigger to respawn an unit if it dies, since the global respawn system won't work for some reason.
____________________-

IF region 1 or 2 contains the triggering unit, then it didn't die, and didn't need to respawn - But if those regions doesn't contain it, it is still in 3 - And it would be dead, because the turtle attacks every third second.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
no it will make you gain time from WE while coppying units -changing their names and more stuff (reduce from 30 seconds to 1 second)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok, I saw no reason why it won't work so I checked it.

I made a catapult that killed my hero and it DID revive him, so its some problem with your map.


Why did you make double conditions ? you can remove one of the pairs.
And why did you make a "create unit ..." action ? you should use the "Hero - Revive ...".
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I meant the double conditions in your revival system.
You have 2 exact same pairs of conditions.

Now I made a similiar trigger that will create a unit for a player when a unit dies, I let the catapult kill him, and guess what ? he was created.

Since this is the case, I can't know the reason unless you show me the map.
 
Level 4
Joined
Jan 2, 2008
Messages
103
You could try changing your Revival system.

Make a Unit called "Revival Orb" or something.
Create it at the first spawn spot.

Editor isnt open, so I'm going to make some guessess.

Event: Unit Dies

Condition: Dying unit = to WanabeSmartie
Number of WanaBeSmartie's on playable map area equal to 0.

Action: Create 1 smartie for player Red at ((Location of unit)(Revival Orb))
Create 1 smartie for player blue at ((Location of unit (Revival Orb))
-Create smarties for all players-
Set health of (Revival Orb -1)

This gives you chances, so if you want to give them 8 chances, make the orb have eight health, 5 chances, 5 health, ect.

Now for moving it:

For all the checkpoints do this trigger

Event- Unit enters Check1-2-3-ect

Condition- unit-type=wanabesmartie

Action: Move Revival Orb to Check1-2-3-ect
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Tried to change all kind of things but he still gets exploded for some reason.

Either use a diffrent unit (orc catapult with a diffrent model for example), or use a ability instead of attack (Cluster Rockets with 1 rocket with a diffrent model will work really great for you).
 
Status
Not open for further replies.
Top