• 🏆 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] Need help with an respwan trigger

Status
Not open for further replies.
Level 2
Joined
Jan 20, 2007
Messages
18
Heya

im makeing an orpg and i have some problems with making a respwan trigger for the monsters. i want them to spwan at a specifed place (without region if possible). if u get any idea post it plz :wink:
 
Level 5
Joined
Jun 5, 2007
Messages
99
Heres what I use. They work very nicely, actually!

  • grayrespawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A structure) Equal to False
      • (Owner of (Dying unit)) Equal to Player 9 (Gray)
    • Actions
      • Wait 600.00 seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
And this next one is for a hero.

  • Resoawn Copy 2 Copy Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Dying unit)) Equal to Player 1 (Red)
    • Actions
      • Wait 15.00 seconds
      • Hero - Instantly revive (Dying unit) at (Center of waygatestartpoint <gen>), Show revival graphics
Might need to tweak them a bit to fit your map, but thats pretty much it. Enjoy!

~Saryeit
 
Level 2
Joined
Jun 10, 2007
Messages
19
The problem with gray respawn is that this will be at the point of dying unit. If you have it there and the unit follows you into your base or something then it will keep spawning there :O Big problem. Heres how to do it.
  • Event-
  • Map initialization
  • Conditons-
  • Actions-
  • Unit group - pick every unit in all units owned by Neutral Hostile and do actions
    • - Set Respawn_Point [Respawn_Count]=Position of Picked Unit
    • - Set Custom Value of Picked unit to Respawn_Count
    • - Set Respawn_Count= Respawn Count + 1
That is your first one. Next:
  • Event-
  • Unit- A unit Dies
  • Conditions-
  • -Owner of Dying Unit= Neutral Hostile
  • Actions-
  • Wait 25 seconds
  • Create 1 Unit type of dying unit for owner of dying unit at Respawn_Point[Custom value of Dying Unit]
  • Set Custom Value of (Last Created Unit) to Custom Value of Dying Unit
Good Luck!
 
Level 18
Joined
May 27, 2007
Messages
1,689
no actually it wont what you need is to use some JASS so it should look like this first for heroes
  • Respawn For Idiots
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Wait 20.00 seconds
      • Set HeroPoint = (Center of (Hero_Respawn))
      • Hero - Instantly revive (Triggering unit) at HeroPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_HeroPoint)
  • Respawn For Idiots
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 9 (Gray)
      • ((Triggering unit) is A structure) Equal to False
    • Actions
      • Wait 10.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)
that should work, there are no leaks, and it will respawn at the correct point
 
Status
Not open for further replies.
Top