• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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: 34
Status
Not open for further replies.
Top