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
Chest-system.w3x
Variables
Initialisierung
Start
Chest
Chest tar
Activate
Open
Left
Right
Leave
Kartenspezifischen eigenen Skript-Code unten eingeben. Dieser Text wird in das Karten-Skript nach der Deklaration der Variablen und vor jeglichem Auslöser-Code eingefügt.
Name
Type
is_array
initial_value
Chests_Chest
unit
No
Chests_Counter
integer
No
Chests_Q_lock
boolean
No
Chests_Spell
abilcode
Yes
Leak
location
Yes
Start
Events
Time - Elapsed game time is 0.10 seconds
Conditions
Actions
Floating Text - Create floating text that reads target a chest and press the up button, if your hero is in range you can start to unlock the chest with the "right" or "left" arrow buttons at (Position of Paladin 0006 <gen>) with Z offset 200.00 , using font size 10 , color ( 100 %, 100 %, 100 %), and 0 % transparency
Melee Game - Use melee time of day (for all players)
Camera - Lock camera target for Player 1 (Red) to Paladin 0006 <gen> , offset by ( 0 , 0 ) using Default rotation
Set Variable Set Chests_Spell[1] = "A000"
Set Variable Set Chests_Spell[2] = "A002"
Set Variable Set Chests_Spell[3] = "A003"
Set Variable Set Chests_Spell[4] = "A004"
Set Variable Set Chests_Spell[5] = "A005"
Set Variable Set Chests_Spell[6] = "A001"
-------- set your chest combinations --------
Unit - Set level of Kombi1 for Truhe 0005 <gen> to 2
Unit - Set level of Kombi2 for Truhe 0005 <gen> to 3
Unit - Set level of Kombi3 for Truhe 0005 <gen> to 2
Unit - Set level of Kombi4 for Truhe 0005 <gen> to 2
Unit - Set level of Kombi5 for Truhe 0005 <gen> to 3
Unit - Set level of Kombi1 for Truhe 0004 <gen> to 2
Unit - Set level of Kombi2 for Truhe 0004 <gen> to 3
Unit - Set level of Kombi3 for Truhe 0004 <gen> to 3
Unit - Set level of Kombi1 for Truhe 0003 <gen> to 3
Unit - Set level of Kombi2 for Truhe 0003 <gen> to 2
Unit - Set level of Kombi3 for Truhe 0003 <gen> to 2
Unit - Set level of Kombi4 for Truhe 0003 <gen> to 2
Unit - Set level of Kombi1 for Truhe 0001 <gen> to 3
Unit - Set level of Kombi2 for Truhe 0001 <gen> to 2
Chest tar
Events
Player - Player 1 (Red) Selects a unit
Conditions
(Unit-type of (Triggering unit)) Equal to Truhe
Actions
Set Variable Set Chests_Chest = (Triggering unit)
Activate
Events
Player - Player 1 (Red) Presses the Up Arrow key
Conditions
(Chests_Chest is selected by Player 1 (Red).) Equal to True
Actions
Set Variable Set Leak[1] = (Position of Chests_Chest)
Set Variable Set Leak[2] = (Position of Paladin 0006 <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Leak[1] and Leak[2]) Less than or equal to 150.00
(Custom value of Chests_Chest) Equal to 0
Then - Actions
Set Variable Set Chests_Counter = "1"
Set Variable Set Leak[3] = (Leak[1] offset by 125.00 towards (Facing of Chests_Chest) degrees.)
Unit - Move Paladin 0006 <gen> instantly to Leak[3]
Unit - Make Paladin 0006 <gen> face Chests_Chest over 0 seconds
-------- important: your chests have to be exactly the angles 0,90,180 or 270 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Facing of Chests_Chest) Equal to 0.00
Then - Actions
Camera - . Apply . gg_cam_Chestcam180 for Player 1 (Red) over 1.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Facing of Chests_Chest) Equal to 90.00
Then - Actions
Camera - . Apply . gg_cam_Chestcam270 for Player 1 (Red) over 1.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Facing of Chests_Chest) Equal to 180.00
Then - Actions
Camera - . Apply . gg_cam_Chestcam0 for Player 1 (Red) over 1.00 seconds
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Facing of Chests_Chest) Equal to 270.00
Then - Actions
Camera - . Apply . gg_cam_Chestcam90 for Player 1 (Red) over 1.00 seconds
Else - Actions
Camera - Lock camera target for Player 1 (Red) to Chests_Chest , offset by ( 0 , 0 ) using Default rotation
Unit - Pause Paladin 0006 <gen>
Custom script: call RemoveLocation (udg_Leak[1])
Custom script: call RemoveLocation (udg_Leak[2])
Trigger - Turn on Leave <gen>
Trigger - Turn on Left <gen>
Trigger - Turn on Right <gen>
Trigger - Turn off Chest_tar <gen>
Trigger - Turn off (This trigger)
Else - Actions
Game - Display to Player Group - Player 1 (Red) the text: chest is to far
Open
Events
Conditions
Actions
Game - Display to (All players) the text: unlock chest!
Set Variable Set Leak[1] = (Position of Chests_Chest)
Special Effect - Create a special effect at Leak[1] using UI\Feedback\GoldCredit\GoldCredit.mdl
Sound - Play Open <gen>
Custom script: call RemoveLocation (udg_Leak[1])
Animation - Play Chests_Chest 's morph animation
Hero - Create Claws of Attack +15 and give it to Paladin 0006 <gen>
Trigger - Run Leave <gen> (checking conditions)
Left
Events
Player - Player 1 (Red) Presses the Left Arrow key
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Chests_Spell[Chests_Counter] for Chests_Chest) Equal to 2
Then - Actions
Set Variable Set Chests_Counter = (Chests_Counter + 1)
Game - Display to (All players) the text: good..
Sound - Play Hit <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Chests_Spell[Chests_Counter] for Chests_Chest) Equal to 1
Then - Actions
Unit - Set the custom value of Chests_Chest to 1
Trigger - Run Open <gen> (ignoring conditions)
Else - Actions
Else - Actions
Set Variable Set Chests_Counter = "1"
Game - Display to (All players) the text: fail, start again..
Sound - Play Hitfail <gen>
Right
Events
Player - Player 1 (Red) Presses the Right Arrow key
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Chests_Spell[Chests_Counter] for Chests_Chest) Equal to 3
Then - Actions
Set Variable Set Chests_Counter = (Chests_Counter + 1)
Game - Display to (All players) the text: good..
Sound - Play Hit <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Chests_Spell[Chests_Counter] for Chests_Chest) Equal to 1
Then - Actions
Unit - Set the custom value of Chests_Chest to 1
Trigger - Run Open <gen> (ignoring conditions)
Else - Actions
Else - Actions
Set Variable Set Chests_Counter = "1"
Game - Display to (All players) the text: fail, start again..
Sound - Play Hitfail <gen>
Leave
Events
Player - Player 1 (Red) Presses the Down Arrow key
Conditions
Actions
Unit - Unpause Paladin 0006 <gen>
Camera - Reset camera for Player 1 (Red) to standard game-view over 1.00 seconds
Camera - Lock camera target for Player 1 (Red) to Paladin 0006 <gen> , offset by ( 0 , 0 ) using Default rotation
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.