• 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] Having some problem with Respawn Triggers...

Status
Not open for further replies.
Level 3
Joined
Jun 14, 2007
Messages
33
Yah, does anyone know what my problem is? I mean I think I have the right triggers down... But could you give me suggestions... I need a Hero Respawn and Monster... I've tried about ten, and none work... I'm sorry I can't put my triggers down right now, but my mouse is really messed up... I'd appreciate the help.

Thanks :thumbs_up:
 
Level 6
Joined
May 19, 2007
Messages
177
This is what i use as my unit respawn
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set foot[1] = Footman 0000 <gen>
  • Untitled Trigger 004
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (Unit-type of foot[1])
    • Actions
      • Wait 20.00 game-time seconds
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of footman <gen>) facing Default building facing degrees
      • Set foot[1] = (Last created unit)
hope this helps
 
Level 5
Joined
Jun 5, 2007
Messages
99
Heres what I use. They work perfectly I've found, except that if you put map tables in their options once you double click them if they are premade *DEEP BREATH*, they will not have the item table. If it is triggered, its fine.

HERO
  • Resoawn Copy 2 Copy Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Dying unit)) Equal to Player 1 (Red)
    • Actions
      • Wait 15.00 seconds
      • Hero - Instantly revive (Dying unit) at (Center of waygatestartpoint <gen>), Show revival graphics
MONSTER
  • grayrespawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A structure) Equal to False
      • (Owner of (Dying unit)) Equal to Player 9 (Gray)
    • Actions
      • Wait 600.00 seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
Those are the triggers I use, you might need to change it a bit depending on how your map works.

Hope this helps! =)

~Saryeit
 
Level 18
Joined
May 27, 2007
Messages
1,689
again with questions like these... saryeit urs is close but it leaks so i should slap you everytime you post it...lol here is waht they should look like
  • Respawn For Idiots
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 9 (Gray)
      • ((Triggering unit) is A structure) Equal to False
    • Actions
      • Wait 10.00 seconds
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Respawn For Idiots Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Wait 20.00 seconds
      • Set HeroPoint = (Center of (Your Region))
      • Hero - Instantly revive (Triggering unit) at HeroPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_HeroPoint)
 
Level 11
Joined
Jun 13, 2007
Messages
570
It leaks the Point, or location of the unit. See how famouspker49 set the location to a variable, then uses that variable in the create unit. Then he goes and removes that location, that will NOT leak.

Also I am pretty sure that if a 2nd unit dies while your trigger is "waiting" that
GetDyingUnit() will return the most recent dead unit, and not your original unit that triggered it in the first place
 
Level 5
Joined
Apr 24, 2007
Messages
90
Heres an advance revive sytem I have. (I didnt do it myself. A guy name SD_Ryoko has a bunch of turorials with demo map.) This system is for heros.
  • Revive Car
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 5 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(GetPlayableMapRect()), true )
      • Custom script: call DestroyTimerDialog(WINDOW)
      • Sound - Stop the currently playing music theme
      • Wait 0.10 seconds
      • Sound - Play war3mapImported\Pay For Your Gas or Lose your ID.wav
      • Wait 3.00 seconds
      • Sound - Stop the currently playing music theme
      • Player - Add -50 to (Owner of (Triggering unit)) Current gold
      • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Triggering player)) + payed $50 for gas.)
      • Wait 0.10 seconds
      • Sound - Play war3mapImported\Pennywise - Live Fast Die Young.mp3
When theactions turn into sound and that ignore it. That is what i use for my map just to make it more intrsting. Also im not sure how to change it from the middle of the map. This is the trigger that I made to fix that. I had to block of the midle of the map though.
  • Car Move
    • Events
      • Unit - A unit enters Move <gen>
    • Conditions
    • Actions
      • If ((Color of (Owner of (Triggering unit))) Equal to Red) then do (Unit - Move (Triggering unit) instantly to (Random point in Team1 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Blue) then do (Unit - Move (Triggering unit) instantly to (Random point in Team1 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Teal) then do (Unit - Move (Triggering unit) instantly to (Random point in Team1 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Purple) then do (Unit - Move (Triggering unit) instantly to (Random point in Team1 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Yellow) then do (Unit - Move (Triggering unit) instantly to (Random point in Team2 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Orange) then do (Unit - Move (Triggering unit) instantly to (Random point in Team2 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Orange) then do (Unit - Move (Triggering unit) instantly to (Random point in Team2 <gen>)) else do (Do nothing)
      • If ((Color of (Owner of (Triggering unit))) Equal to Green) then do (Unit - Move (Triggering unit) instantly to (Random point in Team2 <gen>)) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Druggy) then do (Unit - Move (Triggering unit) instantly to (Random point in Druggy Revive <gen>)) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Jack) then do (Unit - Move (Triggering unit) instantly to (Random point in Druggy Revive <gen>)) else do (Do nothing)
      • If ((Unit-type of (Triggering unit)) Equal to Shurlock Holmes) then do (Unit - Move (Triggering unit) instantly to (Random point in Shurlock Revive <gen>)) else do (Do nothing)
 
Level 6
Joined
Feb 25, 2005
Messages
230
What is the purpose of using those custom scripts? Does it take lesser filesize or what? B'cuz it seemed like Zombie had problems with GUI triggers respawning units, not reviving heroes with custom scripts. The script is really much harder to look at and understand what actually happens. Triggers are so good to get a structure of the whole thing.

And, instead of checking the team of the unit with 12 colours you can use this to move it
  • Move using a Loop
    • Events
      • Unit - A unit enters (Current camera bounds)
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Entering unit)) Equal to (Player((Integer A)))
            • Then - Actions
              • Unit - Move (Entering unit) instantly to (Center of region[(Integer A)])
            • Else - Actions
              • Do nothing

Where the variable "region" is an array with size 12 (one region for each player, set them at initialization)
 
Level 3
Joined
Jun 14, 2007
Messages
33
again with questions like these... saryeit urs is close but it leaks so i should slap you everytime you post it...lol here is waht they should look like
  • Respawn For Idiots
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 9 (Gray)
      • ((Triggering unit) is A structure) Equal to False
    • Actions
      • Wait 10.00 seconds
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Respawn For Idiots Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Wait 20.00 seconds
      • Set HeroPoint = (Center of (Your Region))
      • Hero - Instantly revive (Triggering unit) at HeroPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_HeroPoint)

Umm... would that type of trigger work for Player 12 if it was Respawning? or would you need to change it?
 
Status
Not open for further replies.
Top