S
Spleen1013
Guest
Hi,
In the game that I am making, I want it to start where 3 popup boxes appear and each one presents players with a choice of options.
First box - Race.. there are four races. It records what choice is made as a variable integer.
Second box - Affinity.. either chaotic or lawful. It records your choice as a true/false variable.
Third box - Unit type.. melee, ranged, etc.. It records your choice as an integer.
After the third box, it will check all the spawn triggers for conditions matching the three variables and spawn a unit based on those into an area assigned specifically for that unit type.
However, I have the popup boxes working fine (I think), but then a unit isn't spawned. Here are some bits of my code to clarify things..
Unit type trigger
I also have two more questions..
1. Will it record the variables seperatly for each player, or will I have to make it so there is one variable for each player?
2. Will it only spawn one unit (when it works), or will I have to program in another trigger that prevents it from spawning only one?
Thank you VERY MUCH in advance.
In the game that I am making, I want it to start where 3 popup boxes appear and each one presents players with a choice of options.
First box - Race.. there are four races. It records what choice is made as a variable integer.
Second box - Affinity.. either chaotic or lawful. It records your choice as a true/false variable.
Third box - Unit type.. melee, ranged, etc.. It records your choice as an integer.
After the third box, it will check all the spawn triggers for conditions matching the three variables and spawn a unit based on those into an area assigned specifically for that unit type.
However, I have the popup boxes working fine (I think), but then a unit isn't spawned. Here are some bits of my code to clarify things..
Map Initialization
Set variable Zcastlestart = castlestart <gen>
Event - Time elapsed = 1 second
Action - Pick every player and do actions -
- Clear race1(dialogue variable)
- Change Title
- Create diologue button for race1 labelled Human
- Set variable Human = last created button
- Show race1 to (Picked Player)
Event - Diologue button is pressed
Condition - [clicked button] is = Human
Actions
Set variable race = 1
Set continue = true
Game - Display to Playergroup(triggering player) the text: You picked Human.
Trigger - Run alignment <gen> checking conditions.
Conditions - continue is = true
Actions
Player Group - pick every player in group and do actions -
- dialogue - clear race1
- dialogue - clear pickalign
- dialogue - hide race1 for (triggering player)
- dialogue - change title of pickalign to Choose your Alignment
- dialogue - create button for pickalign labelled "Lawful"
- set variable lawful = last created button
- dialogue -display dialogue for (triggering player)
Event -a button is pressed on pickalign
Condition - button pressed = Lawful
Actions -
Set variable alignment = true
Game - display to triggering player "you are lawful."
Trigger - turn on Unit Type <gen>
Trigger - run Unit Type <gen> ignoring conditions
Unit type trigger
Actions
dialogue - hide pickalign for (triggering player)
dialogue - change title of type to Pick Unit Type
dialoge - create button labelled Melee
set variable melee = last created button
dialogue - show type to triggering player
event - dialogue button is clicked for type
condition - clicked button = melee
action - set job = 1
event - dialogue button clicked for type
conditions
race = 1
alignment = true
job = 1
actions
Create 1 Human Soldier for (triggering player) at (random point in Zcastlestart) facing default building degrees
I also have two more questions..
1. Will it record the variables seperatly for each player, or will I have to make it so there is one variable for each player?
2. Will it only spawn one unit (when it works), or will I have to program in another trigger that prevents it from spawning only one?
Thank you VERY MUCH in advance.


