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

End Game

Status
Not open for further replies.
Level 12
Joined
Apr 16, 2010
Messages
584
Well create 2 triggers:
  • Settings
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Wait 2100.00 seconds
      • Set Point = (Point where the unit should be spawned)
      • Unit - Create 1 (Your Unit) for (Some Player) at Point facing Default building facing (270.0) degrees
      • Set Unit = (Last created unit)
      • Custom script: call RemoveLocation(udg_Point)
  • End
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (==) Unit
    • Actions
      • Game - Victory (Some Player) (Show dialogs, Show scores) //set the players that should win
      • Game - Defeat (Some Player) with the message: Defeat! ////set the players that should loose
 
Level 12
Joined
Apr 16, 2010
Messages
584
At variable Point you must set the value to region or some point on the map, where to spawn the unit.
For Example
  • Set Point = (Center of (Playable map area)) //here we set the value to center of the map or if you want to set the value to some region this
  • Set Point = (Center of Rect 000 <gen>)
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
Well create 2 triggers:
  • Settings
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Wait 2100.00 seconds
      • Set Point = (Point where the unit should be spawned)
      • Unit - Create 1 (Your Unit) for (Some Player) at Point facing Default building facing (270.0) degrees
      • Set Unit = (Last created unit)
      • Custom script: call RemoveLocation(udg_Point)
  • End
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (==) Unit
    • Actions
      • Game - Victory (Some Player) (Show dialogs, Show scores) //set the players that should win
      • Game - Defeat (Some Player) with the message: Defeat! ////set the players that should loose

It's way better to use
  • Time - Elapsed game time is 2100.00 seconds
in first trigger.
 
Level 12
Joined
Apr 16, 2010
Messages
584
okay Malthe16 here you go a test map with two triggers and a region where to spawn a unit.
You need to cope Folder called "End Game" to your map and Region called "Spawn Point"
After you copy those into your map check if point value is that region, like this:
  • Set Point = (Center of Spawn Point <gen>)
Test map attached below...
 

Attachments

  • End Game.w3x
    16.9 KB · Views: 37
Status
Not open for further replies.
Top