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

Help Monster Respawn

Status
Not open for further replies.
Level 3
Joined
Apr 29, 2013
Messages
20
How can i Respawn a Unit(Neutral Hostile) that died to its original position...Not to the position when it died.

Thanks in Advanced....
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
  • Neutral Hostiles
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • (((Dying unit) is A Hero) Equal to False)
    • Actions
      • Wait 15.00 seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at (Position of (Triggering unit)) facing Default building facing degrees
Condition and wait is optional. But of course you need to fix the point leak and null it.
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
im pretty sure hero - revive unit still revives units. not just heroes.

Oh... looks like I misunderstood again; it's just that the Hero - Revive Hero is in the Hero Category of the available Actions in the Trigger Editor's GUI interface so I though it just revived heroes but I guess I was wrong... thanks for pointing that out though =)
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Oh... looks like I misunderstood again; it's just that the Hero - Revive Hero is in the Hero Category of the available Actions in the Trigger Editor's GUI interface so I though it just revived heroes but I guess I was wrong... thanks for pointing that out though =)

technically a hero is a unit and thats how it is seen by the system.
 
Level 3
Joined
Apr 29, 2013
Messages
20
  • Neutral Hostiles
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • (((Dying unit) is A Hero) Equal to False)
    • Actions
      • Wait 15.00 seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at (Position of (Triggering unit)) facing Default building facing degrees
Condition and wait is optional. But of course you need to fix the point leak and null it.

I did the Trigger Just Like This one But It Respawns the Monster to the Position where it DIED not to the ORIGINAL POSITION
 
Level 20
Joined
Apr 14, 2012
Messages
2,901
^ Oh in this case do this:

  • Save the Positions
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Unit Group - Pick every Unit owned by Neutral Hostile and Do (Actions)
      • Loop - Actions
        • For Each Integer Variable from 1 to (Number of Units owned by Neutral Hostile), Do (Actions)
          • Set Point[Integer_Variable] = Position of Picked Unit
I haven't tested this out myself and the working trigger might now actually look like this because I only typed it based on sheer memory. But this should work. If it doesn't well I'll just create one in the Editor again and test that trigger, and post the working trigger in the event that the trigger I posted here does not work.

(I'm getting lazy these days sorry)
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
^ Oh in this case do this:

  • Save the Positions
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Unit Group - Pick every Unit owned by Neutral Hostile and Do (Actions)
      • Loop - Actions
        • For Each Integer Variable from 1 to (Number of Units owned by Neutral Hostile), Do (Actions)
          • Set Point[Integer_Variable] = Position of Picked Unit
I haven't tested this out myself and the working trigger might now actually look like this because I only typed it based on sheer memory. But this should work. If it doesn't well I'll just create one in the Editor again and test that trigger, and post the working trigger in the event that the trigger I posted here does not work.

(I'm getting lazy these days sorry)

It should work and nah you didnt get lazy, you became more helpful =) Cheer up!
 
Level 1
Joined
May 3, 2013
Messages
3
^ Oh in this case do this:

  • Save the Positions
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Unit Group - Pick every Unit owned by Neutral Hostile and Do (Actions)
      • Loop - Actions
        • For Each Integer Variable from 1 to (Number of Units owned by Neutral Hostile), Do (Actions)
          • Set Point[Integer_Variable] = Position of Picked Unit
I haven't tested this out myself and the working trigger might now actually look like this because I only typed it based on sheer memory. But this should work. If it doesn't well I'll just create one in the Editor again and test that trigger, and post the working trigger in the event that the trigger I posted here does not work.

(I'm getting lazy these days sorry)

You should also assign the custom value of the picked unit to Integer A or in some other way store which index the unit has in the point array. Otherwise you won't know which unit should respawn where.

Also, as a side note, the maximum amount of units that can be stored this way is 8192 since that's the max size of an array. You probably won't need to worry about it unless your making a ginormous map but it's still worth keeping in mind.
 
Status
Not open for further replies.
Top