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
Square Based.w3x
Variables
Initialization
Init
Notes
Esc trigger
Convert Number to Square
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
TempReal
real
Yes
0.00
TempUnit
unit
Yes
My intention was to make a square based system to produce an engine that could potentially mimic games like Sid meiers Civilization.
Init
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
For each (Integer A) from 1 to 28 , do (Actions)
Loop - Actions
For each (Integer B) from 1 to 28 , do (Actions)
Loop - Actions
Set Variable Set TempReal[1] = "-7168.00"
Set Variable Set TempReal[1] = (TempReal[1] + ((Real((Integer A))) x 512.00))
Set Variable Set TempReal[2] = "-7168.00"
Set Variable Set TempReal[2] = (TempReal[2] + ((Real((Integer B))) x 512.00))
Special Effect - Create a special effect at (Point(TempReal[1], TempReal[2])) using Doodads\LordaeronSummer\Props\TorchHuman\TorchHuman.mdl
Square 1 Position
X: -7168
Y: -7168
Square 784 (28*28)
X: 7168
Y: 7168
Conclusion: 1 square is 512x512 Warcraft Distance Units (WDU)
Max distance to left:
28 squares and 28 more to bottom
Notes
Events
Conditions
Actions
Esc trigger
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Set Variable Set TempUnit[1] = (Random unit from (Units currently selected by Player 1 (Red)))
-------- --------
Set Variable Set TempReal[1] = (X of (Position of TempUnit[1]))
Set Variable Set TempReal[1] = (TempReal[1] + 7168.00)
Set Variable Set TempReal[1] = (TempReal[1] / 512.00)
Set Variable Set TempReal[1] = (Abs(TempReal[1]))
Game - Display to (All players) the text: (X: + (String((Integer(TempReal[1])))))
-------- --------
Set Variable Set TempReal[2] = (Y of (Position of TempUnit[1]))
Set Variable Set TempReal[2] = (TempReal[2] + 7168.00)
Set Variable Set TempReal[2] = (TempReal[2] / 512.00)
Set Variable Set TempReal[2] = (Real((Integer(TempReal[2]))))
Game - Display to (All players) the text: (Y: + (String((Integer(TempReal[2])))))
Set Variable Set TempReal[2] = (TempReal[2] x 28.00)
-------- --------
Set Variable Set TempReal[3] = (TempReal[2] + TempReal[1])
Game - Display to (All players) the text: (XY: + (String((Integer(TempReal[3])))))
This trigger converts a number into a square
Convert Number to Square
Events
Player - Player 1 (Red) types a chat message containing (Unexpected type: 'stringnoformat') as A substring
Conditions
(Real((Entered chat string))) Greater than -0.01
(Real((Entered chat string))) Equal to (Real((Integer((Real((Entered chat string)))))))
Actions
Set Variable Set TempReal[1] = (Real((Entered chat string)))
For each (Integer A) from 1 to 28 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempReal[1] Greater than 27.00
Then - Actions
Set Variable Set TempReal[1] = (TempReal[1] - 28.00)
Else - Actions
Game - Display to (All players) the text: (X: + (String((Integer(TempReal[1])))))
-------- --------
Set Variable Set TempReal[2] = (Real((Entered chat string)))
Set Variable Set TempReal[2] = (TempReal[2] / 28.00)
Set Variable Set TempReal[2] = (Real((Integer(TempReal[2]))))
Game - Display to (All players) the text: (Y: + (String((Integer(TempReal[2])))))
-------- --------
Game - Display to (All players) the text: (XY: + (Entered chat string))
Special Effect - Create a special effect at (Point((-6912.00 + (512.00 x TempReal[1])), (-6912.00 + (512.00 x TempReal[2])))) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
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.