• 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.

[Trigger] Respawning Trigger

Status
Not open for further replies.
Level 1
Joined
Jun 21, 2009
Messages
282
+rep Hey guys, i'm needing a respawning trigger..

Heres what i've got so far

Event: A unit Die

Condition: Unit type of Dying unit equal to Bandit

Action:

Modify Strength of killing unit by 2

Modify Agility of killing unit by 2

Modify Intell of killing unit by 2

Wait 120 Seconds

Unit - Create 1 Brigand for neutral hostile at position of dying unit facing default building facing degrees

Please and thank you :grin:
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You basically wrote the trigger yourself ;)

  • Untitled Trigger 027
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Hero - Modify Strength of (Triggering unit): Add 10
      • Wait 2.00 seconds
      • Set Temp_Loc_1 = (Position of (Triggering unit))
      • Unit - Create 1 Footman for Neutral Hostile at Temp_Loc_1 facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
 
Level 9
Joined
Jun 20, 2008
Messages
476
That would only revive the unit at the position he dies if u want him to res at the point he whas place in the editor u need tihs

  • map init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Respawn_Time = 50.00
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set Temp_Integer = (Temp_Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Temp_Integer
          • Set Creep_Point[Temp_Integer] = (Position of (Picked unit))
  • other
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
      • (Custom value of (Triggering unit)) Greater than 0
    • Actions
      • Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
      • Wait Respawn_Time game-time seconds
      • Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
the variables are

Temp_integer= integer
Respawn_time=integer
creep_point= point
 
Status
Not open for further replies.
Top