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!
In my TD, i want to have it where players on force 1 are automatically a race of my pre-selection. If anyone could tell me how to do this, it would be greatly appreciated.
Melee Game - Create starting units (for all players)
from Map Initialization
You will then need to make some triggers like this:
Code:
Dialog Actions
Events
Dialog - A dialog button is clicked for Dialog
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtonUndead
Then - Actions
Player Group - Pick every player in Force[ForceNumber] and do (Actions)
Loop - Actions
Unit - Create 5 Acolyte for (Picked player) at ((Picked player) start location) facing Default building facing (270.0) degrees
Unit - Create 1 Tree of Life for (Picked player) at ((Picked player) start location) facing Default building facing (270.0) degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtonHuman
Then - Actions
Player Group - Pick every player in Force[ForceNumber] and do (Actions)
Loop - Actions
Unit - Create 5 Peasant for (Picked player) at ((Picked player) start location) facing Default building facing (270.0) degrees
Unit - Create 1 Town Hall for (Picked player) at ((Picked player) start location) facing Default building facing (270.0) degrees
Else - Actions
Set ForceNumber = 2
Dialog - Change the title of Dialog to (Set race of Force + (String(ForceNumber)))
Dialog - Show Dialog for (Triggering player)
Code:
Dialog Setup
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Dialog - Change the title of Dialog to (Set race of Force + (String(ForceNumber)))
Dialog - Create a dialog button for Dialog labelled Undead
Set DialogButtonUndead = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled Human
Set DialogButtonHuman = (Last created dialog Button)
Code:
Melee Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Run melee AI scripts (for computer players)
Melee Game - Enforce victory/defeat conditions (for all players)
Player Group - Add Player 1 (Red) to Force[1]
Player Group - Add Player 2 (Blue) to Force[1]
Player Group - Add Player 3 (Teal) to Force[2]
Player Group - Add Player 4 (Purple) to Force[2]
I also made a demo map for you. You will need to specify all stuff so it matches your needs.
Yeah, that would work if used the dialog box, but when you enter in some games, you will find, that the race will be set to an alliance that can not be altered. Are there anyways, without triggers, to do that?
Yeah, i figured that, but when i test the game i will have possibly an Orcish Theme, a Human Theme, or Night Elf Theme, when it is supposed to be altered to an Undead Theme.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.