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

Respawn Trigger Not Working!

Status
Not open for further replies.
Level 5
Joined
Feb 14, 2005
Messages
48
Ok i made a respawn trigger that dosent work. Its supposed to trigger when a unit dies, and it checks if any units for that player is still alive, if its true, then it creates a selector. Heres how the thing looks like...

Event - A unit dies
Condition - Get unit alive(Number of units(Get owning player)equal to 0
Action - Create 1 Selector for Owner(Dying unit)Facing triggering unit.

For some weird reason the condition is retarded. All the units are no longer there, but it still wont spawn the selector...

Someone help please?
 
Level 6
Joined
Feb 18, 2005
Messages
263
is it possible that you have created any other units than the selector?

i do not yet understand totaly what you want to archieve with that trigger. Do you want the hero to select a new one if he dies or do you want to do something different?

Please tell how many units a player has - including all structures...
for the respawn condition you check that the player has NO other units - that includes stuff like selection circles...

hope this does anyhow help you...

- Raszul
 
Level 5
Joined
Feb 14, 2005
Messages
48
There are no other units besides the one you chose with the selector. The selector is just a unit that dies when it enters a unit region choosing a unit.

This trigger is supposed to create another SELECTOR once all the units already chosen dies.

Also there are no other units to the players except the selector, but it dies when it chooses a unit.

And the unit itself, which, when it dies, spawns a selector.

Also, do corpses count as units? If so then i have to make it so it doesnt count corpses...
 
Level 4
Joined
Feb 12, 2006
Messages
99
Couldn't you just do a periodic event, like:

Events: Every 1 seconds of game time

Conditions: (This is an integer comparison) Number of units in Playable Map Area owned by (whatever player) equal to 0

Events: Create 1 Selector for (whatever player yet again) at the center of (the region)

You can do it that way, as long as the condition can be done. You can also do units matching condition in the integer comparison if you can't use a "Units owned by player in region" function.
 
Level 10
Joined
Jul 14, 2004
Messages
463
Did you try to insert a wait before the condition, like this:
Code:
Events
-A unit dies

Conditions
-no condition

Actions
-wait 2 seconds
-IF number of units alive equal to 0 then create Selector
This is just to make sure that the dieing unit isn't supposed as alive anymore.

Does your trigger work with any numbers different from 0? You should test what happens then.
 
Status
Not open for further replies.
Top