- Joined
- Jun 8, 2010
- Messages
- 283
Ive made a dialog system for a game mode. Basically at the beginning all unused players are removed from the game. Those who are in "Is Playing" slot status condition, will be added to the unit group "Team_Human" which is basically the human team. Then when selecting the corresponding dialog button selecting One, Two, or Three player zombies would randomy remove those player's Units from the Unit Group "Team_Human" and add them to the unit group "Team_Zombie" also creating a zombie unit for those selected.
I have 3 different variations of this trigger that will randomly select a player's unit, remove their "Human" unit and then create a zombie unit.
Heres the current trigger, theres 2 (first one is when Host selects 1 Zombie, and second trigger is when host selects 2 zombies). I didnt include the third trigger because its pretty much the same except with the creation of 3 units.
I know I didnt use the variable there properly, and it does nothing, but I just left it there so you can get a general idea of what im trying to accomplish.
EDIT: I also have this trigger that would create randomly a zombie at a random point position of a human unit.
Unit - Create 1 Zombie (Hooked Flesh) for Neutral Hostile at (Random point in (Region centered at (Playable Map Position of (Random unit from team_human)) with size (10.00, 10.00))) facing (Random angle) degrees
I have 3 different variations of this trigger that will randomly select a player's unit, remove their "Human" unit and then create a zombie unit.
Heres the current trigger, theres 2 (first one is when Host selects 1 Zombie, and second trigger is when host selects 2 zombies). I didnt include the third trigger because its pretty much the same except with the creation of 3 units.
I know I didnt use the variable there properly, and it does nothing, but I just left it there so you can get a general idea of what im trying to accomplish.
-
infection 1 zombie
-
Events
-
Dialog - A dialog button is clicked for dialogwindow
-
-
Conditions
-
(Clicked dialog button) Equal to dialogbutton[5]
-
-
Actions
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of Host) + has selected Infection Mode)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Unit Group - Add (Random unit from team_human) to team_zombie
-
Set a_selectedunit[1] = (Random unit from team_zombie)
-
Unit Group - Remove a_selectedunit[1] from team_human
-
Unit - Create 1 Zombie (Hooked Flesh) for (Owner of a_selectedunit[1]) at (Center of start squad mode 1 <gen>) facing Default building facing degrees
-
-
Else - Actions
-
-
Unit Group - Pick every unit in team_human and do (Actions)
-
Loop - Actions
-
Unit - Move (Picked unit) instantly to (Random point in start squad mode 1 <gen>), facing Default building facing degrees
-
-
-
Cinematic - Fade in over 5.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Camera - Lock camera target for (Player((Player number of (Picked player)))) to PlayersHero[(Player number of (Picked player))], offset by (0.00, 0.00) using Default rotation
-
Set CurrentCamera[(Player number of (Picked player))] = 2
-
-
-
-
-
infection 2 zombies
-
Events
-
Dialog - A dialog button is clicked for dialogwindow
-
-
Conditions
-
(Clicked dialog button) Equal to dialogbutton[5]
-
-
Actions
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of Host) + has selected Infection Mode)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Unit Group - Add (Random unit from team_human) to team_zombie
-
Set a_selectedunit[1] = (Random unit from team_zombie)
-
Unit Group - Remove a_selectedunit[1] from team_human
-
Unit - Create 1 Zombie (Hooked Flesh) for (Owner of a_selectedunit[1]) at (Center of start squad mode 1 <gen>) facing Default building facing degrees
-
Unit Group - Add (Random unit from team_human) to team_zombie
-
Set a_selectedunit[2] = (Random unit from team_zombie)
-
Unit Group - Remove a_selectedunit[2] from team_human
-
Unit - Create 1 Zombie (Hooked Flesh) for (Owner of a_selectedunit[2]) at (Center of start squad mode 1 <gen>) facing Default building facing degrees
-
Unit Group - Add (Random unit from team_human) to team_zombie
-
Set a_selectedunit[3] = (Random unit from team_zombie)
-
Unit Group - Remove a_selectedunit[3] from team_human
-
Unit - Create 1 Zombie (Hooked Flesh) for (Owner of a_selectedunit[3]) at (Center of start squad mode 1 <gen>) facing Default building facing degrees
-
-
Else - Actions
-
-
Unit Group - Pick every unit in team_human and do (Actions)
-
Loop - Actions
-
Unit - Move (Picked unit) instantly to (Random point in start squad mode 1 <gen>), facing Default building facing degrees
-
-
-
Cinematic - Fade in over 5.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Camera - Lock camera target for (Player((Player number of (Picked player)))) to PlayersHero[(Player number of (Picked player))], offset by (0.00, 0.00) using Default rotation
-
Set CurrentCamera[(Player number of (Picked player))] = 2
-
-
-
-
-
Unit - Create 1 Zombie (Hooked Flesh) for Neutral Hostile at (Random point in (Region centered at (Position of (Random unit from team_human)) with size (10.00, 10.00))) facing (Random angle) degrees
Unit - Create 1 Zombie (Hooked Flesh) for Neutral Hostile at (Random point in (Region centered at (Playable Map Position of (Random unit from team_human)) with size (10.00, 10.00))) facing (Random angle) degrees
Last edited: