• 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] RPG respawn trigs

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
so this is probably a crap ghetto way to do this (i did it a looong time ago)
It seems to not respawn some naga units for some reason i think its because i replaced them from being the campaign little naga to the neutral hostile also they use to glitch after a while in the game and 1 naga would also replicate, it would get to the point that everytime that naga died later in the game it would exponentially multiply..
you kill 2, then 4 respawn then 8 and so on

  • Respawn 3 Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Temp_Integer = 1
      • Set Temp_UnitGroup = (Units owned by Player 12 (Brown))
      • Unit Group - Pick every unit in Temp_UnitGroup and do (Actions)
        • Loop - Actions
          • Set graveyardpoint[Temp_Integer] = (Position of (Picked unit))
          • Set graveyardunit[Temp_Integer] = (Unit-type of (Picked unit))
          • Unit - Set the custom value of (Picked unit) to Temp_Integer
          • Set Temp_Integer = (Temp_Integer + 1)
      • Custom script: call DestroyGroup (udg_Temp_UnitGroup)
  • Respawn 3
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
    • Actions
      • Wait 60.00 seconds
      • Unit - Create 1 graveyardunit[(Custom value of (Dying unit))] for Player 12 (Brown) at graveyardpoint[(Custom value of (Dying unit))] facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))
 
Triggering unit is more of a local case. Event responses (e.g. Dying unit/ Casting unit) most likely refer to specific event and are considered more 'global', which means that they get easily replaced by other units that fire the trigger. There are certain cases, in which they work, but Triggering unit is a) faster and b) more 'local'.
 
Status
Not open for further replies.
Top