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

Is it possible to Melee - Create starting unit on AI excluding players?

Status
Not open for further replies.
Level 29
Joined
Feb 18, 2014
Messages
3,595
You could remove them after melee initialization :
  • Trigger
    • Events
      • Countdown Timer - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
However, the player will be defeated if you have the Enforce victory/defeat condition enabled.
 
Level 2
Joined
Aug 7, 2019
Messages
5
You can also use MeleeStartingUnitsForPlayer( race , player , location , doHeroes ) - the last parameter is a boolean if set to true, make the first hero free.
 
Level 7
Joined
Dec 6, 2010
Messages
153
You could remove them after melee initialization :
  • Trigger
    • Events
      • Countdown Timer - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
However, the player will be defeated if you have the Enforce victory/defeat condition enabled.

You can also use MeleeStartingUnitsForPlayer( race , player , location , doHeroes ) - the last parameter is a boolean if set to true, make the first hero free.

Ill try both of these thank you
 
Status
Not open for further replies.
Top