• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Unit revival

Status
Not open for further replies.
Level 6
Joined
Apr 22, 2009
Messages
165
I'm making a game and i ened a trigger whiuch does the following IN GUI PLZ.
EVENT:
UNIT DIES
CONDITION:
For conditions I need to 1 make sure its the right type of unit and 2 make sure the palyer is still playing.(this should also fish out neatral hostile)
ACTION:
wait (number) Second
I need to revive the unit in either REDS RESPAWN/BLUES RESPAWN/PURPLES RESPAN OR TEALS RESPAWN depending on which colour person it belogns to.
 
Ok, my solution takes two triggers:
  • RespawnInit
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Set Respawn[1] = Player1Respawn <gen>
      • Set Respawn[2] = Player2Respawn <gen>
      • Set Respawn[3] = Player3Respawn <gen>
      • Set Respawn[4] = Player4Respawn <gen>
      • Set Respawn[5] = Player5Respawn <gen>
      • Set Respawn[6] = Player6Respawn <gen>
      • Set Respawn[7] = Player7Respawn <gen>
      • Set Respawn[8] = Player8Respawn <gen>
      • Set Respawn[9] = Player9Respawn <gen>
      • Set Respawn[10] = Player10Respawn <gen>
      • Set Respawn[11] = Player11Respawn <gen>
      • Set Respawn[12] = Player12Respawn <gen>
  • Die
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Triggering unit)) slot status) Equal to Is playing
      • ((Triggering unit) is in (Units owned by Neutral Passive)) Not equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Rifleman
    • Actions
      • Wait 2.00 seconds
      • Set RLoc = (Random point in Respawn[(Player number of (Owner of (Triggering unit)))])
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at RLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_RLoc)
Happy triggering ;)
EDIT: Fixed by Maker's request
EDIT2: RemoveLocation, not DestroyLocation
 
Last edited:
Make sure you have a POINT variable named RLoc.
also: Please spell check your posts before you hit the submit button
 
No i mean for the first 12 variables i cant use [] willt hat affect the tirgger if i dont use [] or () in the variable?
Ah, ok. now i understand what you're talking about. The Respawn variable needs to be an Array Region variable (make sure you hook the array checkbox).
If you can't use arrays in your map you'll have to make one trigger for each player. e.g.:
  • Player1Die
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • ((Owner of (Triggering unit)) slot status) Equal to Is playing
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Rifleman
    • Actions
      • Wait 2.00 seconds
      • Set RLoc = (Random point in Player1Respawn)
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at RLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_RLoc)
  • Player2Die
    • Events
      • Unit - A unit owned by Player 2 (Blue) Dies
    • Conditions
      • ((Owner of (Triggering unit)) slot status) Equal to Is playing
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Rifleman
    • Actions
      • Wait 2.00 seconds
      • Set RLoc = (Random point in Player2Respawn)
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at RLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_RLoc)
etc... which needlessly to say is a major pain in the lower back regions compared to arrays
 
Weaker Titans
Events
Unit - A unit Dies
Conditions
((Owner of (Triggering unit)) slot status) Equal to Is playing
(Owner of (Triggering unit)) Not equal to Neutral Hostile
(Owner of (Triggering unit)) Not equal to Neutral Passive
Or - Any (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Equal to Goblin Titan
(Unit-type of (Triggering unit)) Equal to Harpy Titan
(Unit-type of (Triggering unit)) Equal to Ocean Titan
Actions
Wait 120.00 seconds
Set RLoc = (Random point in Respawn[(Player number of (Owner of (Triggering unit)))])
Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at RLoc facing Default building facing degrees
Custom script: call RemoveLocation(udg_RLoc)


It wotn work whats wrong?
 
Status
Not open for further replies.
Back
Top