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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
TTT Beta V1.w3x
Variables
Initialization/Other
Initialization
Leave Alert
Place Pieces
Place Pieces Initialization
Place Pieces Initialization Blue
Select Piece
Select Piece Blue
Win/Lose
Win Lose
AI (not really)
AI
AI Copy
Commands
Commands
Zoom
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
Integer
integer
No
Location
location
Yes
Piece
unit
Yes
PieceOwner
integer
Yes
SelectedUnit
unit
No
TempUnitGroup
group
No
Unit
unit
No
UnitNull
UnitPlaced
boolean
Yes
Wins
integer
Yes
Initialization
Events
Map initialization
Conditions
Actions
Game - Set the time of day to 12
Game - Lock the game speed
Game - Disable drag-selection functionality ( Disable drag-selection box)
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
Visibility - Create an initially Enabled visibility modifier for Player 2 (Blue) emitting Visibility across (Playable map area)
Quest - Create a Required quest titled General Info with the description When it is your turn, click on a circle to create a unit at that positionTry to get 3 of your units in a row.Every direction is possible (horizontal, vertical, diagonal).The game will automatically create a rematch when someone wins, or it ends in a tie. , using icon path ReplaceableTextures\CommandButtons\BTNSpy.blp
Quest - Create a Required quest titled Commands with the description |c00ffcc00Command List:|r|c000088ff-Commands|r Shows the command-list|c000088ff-Zoom [XXX]|r ([XXX] is a number between 800 and 2000), zooms the camera to the specific number.|c000088ff-RCam|r Resets the camera to the original|c000088ff-NCam|r Shows the normal camera (sideview, like in melee-maps). , using icon path ReplaceableTextures\CommandButtons\BTNSorceressMaster.blp
Quest - Create a Required quest titled Credits with the description |c00ffcc00Made by:|r A7xpwns3|c00ffcc00Special thanks to:|r ap0calypse_DaM , using icon path ReplaceableTextures\CommandButtons\BTNInfernalStone.blp
Camera - . Apply . gg_cam_Game_Camera for Player 1 (Red) over 0.00 seconds
Camera - . Apply . gg_cam_Game_Camera for Player 2 (Blue) over 0.00 seconds
Wait 2 seconds
Game - Display to (All players) the text: Welcome to Tic-Tac-Toe.
Wait 5.00 seconds
Game - Display to (All players) the text: Choose where you want to place your piece by selecting a circle above a column.
Wait 5.00 seconds
Set Variable Set Location[1] = (Center of Region_000_Copy_6 <gen>)
Set Variable Set Location[2] = (Center of Region_000_Copy_7 <gen>)
Set Variable Set Location[3] = (Center of Region_000_Copy_8 <gen>)
Set Variable Set Location[4] = (Center of Region_000_Copy_3 <gen>)
Set Variable Set Location[5] = (Center of Region_000_Copy_4 <gen>)
Set Variable Set Location[6] = (Center of Region_000_Copy_5 <gen>)
Set Variable Set Location[7] = (Center of Region_000 <gen>)
Set Variable Set Location[8] = (Center of Region_000_Copy <gen>)
Set Variable Set Location[9] = (Center of Region_000_Copy_2 <gen>)
Trigger - Turn on Place_Pieces_Initialization <gen>
Trigger - Turn on Win_Lose <gen>
Leave Alert
Events
Time - Every 0.05 seconds of game time
Conditions
Or - Any (Conditions) are true
Conditions
(Player 1 (Red) slot status) Equal to Has left the game
(Player 2 (Blue) slot status) Equal to Has left the game
Actions
Game - Display to (All players) the text: The other player has left the game. Shouldn't have owned him that much, man.
Trigger - Turn off (This trigger)
Place Pieces Initialization
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Trigger - Turn off (This trigger)
Game - Display to (All players) the text: |c00ffcc00It is red's turn.|r
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Player 1 (Red) controller) Equal to Computer
(Player 1 (Red) controller) Equal to None
(Player 1 (Red) slot status) Equal to Is unused
Then - Actions
Trigger - Run AI_Copy <gen> (checking conditions)
Else - Actions
For each (Integer A) from 1 to 9 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitPlaced[(Integer A)] Equal to False
Then - Actions
Unit - Create 1 Place Piece for Player 1 (Red) at Location[(Integer A)] facing (Position of (Triggering unit))
Set Variable Set Piece[(Integer A)] = (Last created unit)
Else - Actions
Trigger - Turn on Select_Piece <gen>
Place Pieces Initialization Blue
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Trigger - Turn off (This trigger)
Game - Display to (All players) the text: |c00ffcc00It is blue's turn.|r
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Player 2 (Blue) controller) Equal to Computer
(Player 2 (Blue) controller) Equal to None
(Player 2 (Blue) slot status) Equal to Is unused
Then - Actions
Trigger - Run AI <gen> (checking conditions)
Else - Actions
For each (Integer A) from 1 to 9 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitPlaced[(Integer A)] Equal to False
Then - Actions
Unit - Create 1 Place Piece for Player 2 (Blue) at Location[(Integer A)] facing (Position of (Triggering unit))
Set Variable Set Piece[(Integer A)] = (Last created unit)
Else - Actions
Trigger - Turn on Select_Piece_Blue <gen>
Select Piece
Events
Player - Player 1 (Red) Selects a unit
Conditions
(Unit-type of (Triggering unit)) Equal to Place Piece
Actions
Set Variable Set TempUnitGroup = (Units currently selected by Player 1 (Red))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in TempUnitGroup) Greater than 1
Then - Actions
Game - Display to (Player group(Player 1 (Red))) for 8.00 seconds the text: You can only select 1 piece
Skip remaining actions
Else - Actions
For each (Integer A) from 1 to 9 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random unit from TempUnitGroup) Equal to Piece[(Integer A)]
Then - Actions
Unit - Create 1 . Tic-Tac-To Piece LOCUST RED for Player 1 (Red) at Location[(Integer A)] facing 270.00 degrees
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Last created unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Special Effect - Destroy (Last created special effect)
Set Variable Set TempUnitGroup = (Units in (Playable map area))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Last created unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Special Effect - Destroy (Last created special effect)
Set Variable Set TempUnitGroup = (Units in (Playable map area))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Last created unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Special Effect - Destroy (Last created special effect)
Set Variable Set TempUnitGroup = (Units in (Playable map area))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Last created unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Special Effect - Destroy (Last created special effect)
Set Variable Set TempUnitGroup = (Units in (Playable map area))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Trigger - Turn on Place_Pieces_Initialization_Blue <gen>
Trigger - Turn off Select_Piece <gen>
Commands
Events
Player - Player 1 (Red) types a chat message containing - (Unexpected type: 'stringnoformat') as A substring
Player - Player 2 (Blue) types a chat message containing - (Unexpected type: 'stringnoformat') as A substring
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entered chat string) Equal to -commands
Then - Actions
Game - Display to (Player group((Triggering player))) for 12.00 seconds the text: ::: |c00ffcc00Command List:|r :::|c000088ff-Zoom [XXX]|r ([XXX] is a number between 1500 and 2500), zooms the camera to the specific number.|c000088ff-RCam|r Resets the camera to the original|c000088ff-NCam|r Shows the normal camera (sideview, like in melee-maps).
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entered chat string) Equal to -rcam
Then - Actions
Camera - . Apply . gg_cam_Game_Camera for (Triggering player) over 1.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Entered chat string) Equal to -ncam
Then - Actions
Camera - Reset camera for (Triggering player) to standard game-view over 2.00 seconds
Else - Actions
Zoom
Events
Player - Player 1 (Red) types a chat message containing -zoom (Unexpected type: 'stringnoformat') as A substring
Player - Player 2 (Blue) types a chat message containing -zoom (Unexpected type: 'stringnoformat') as A substring
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer((Substring((Entered chat string), 7, 10)))) Greater than 2500
Then - Actions
Camera - . Apply . gg_cam_Game_Camera for (Triggering player) over 2.00 seconds
Camera - Set (Triggering player) 's camera Distance to target to 2500.00 over 2.00 seconds
Game - Display to (All players) for 10.00 seconds the text: |c00cc0000Error:|rCould not zoom out further than 2500. The camera distance has been set to 2500.
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer((Substring((Entered chat string), 7, 10)))) Less than 1500
Then - Actions
Camera - . Apply . gg_cam_Game_Camera for (Triggering player) over 2.00 seconds
Camera - Set (Triggering player) 's camera Distance to target to 1500.00 over 2.00 seconds
Game - Display to (All players) for 10.00 seconds the text: |c00cc0000Error:|rCould not zoom in further than 1500. The camera distance has been set to 1500.
Skip remaining actions
Else - Actions
Camera - . Apply . gg_cam_Game_Camera for (Triggering player) over 2.00 seconds
Camera - Set (Triggering player) 's camera Distance to target to (Real((Substring((Entered chat string), 7, 10)))) over 2.00 seconds
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.