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
Fogclick Detection.w3x
Variables
Fogclick Detection
Fogclick Start
Fogclick False
Fogclick Notification
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
Fogclick_Index
integer
No
Fogclick_Loop
integer
No
Fogclick_Player
player
Yes
Fogclick_Time
integer
Yes
Fogclick_Unit
unit
Yes
Fogclick Start
Events
Player - Player 1 (Red) Selects a unit
Conditions
((Triggering unit) is invisible to (Triggering player).) Equal to True
Actions
Trigger - Turn on Fogclick_Notification <gen>
Set Variable Set Fogclick_Index = (Fogclick_Index + 1)
Set Variable Set Fogclick_Player[Fogclick_Index] = (Triggering player)
Set Variable Set Fogclick_Time[Fogclick_Index] = "0"
Set Variable Set Fogclick_Unit[Fogclick_Index] = (Triggering unit)
Fogclick False
Events
Player - Player 1 (Red) Deselects a unit
Conditions
Actions
-------- /////This trigger to avoid false notifications when player not use maphack click on a unit that has just entered fog////// --------
For each (Integer Fogclick_Loop ) from 1 to Fogclick_Index , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering unit) Equal to Fogclick_Unit[Fogclick_Loop]
Then - Actions
Set Variable Set Fogclick_Player[Fogclick_Loop] = Fogclick_Player[Fogclick_Index]
Set Variable Set Fogclick_Time[Fogclick_Loop] = Fogclick_Time[Fogclick_Index]
Set Variable Set Fogclick_Unit[Fogclick_Loop] = Fogclick_Unit[Fogclick_Index]
Set Variable Set Fogclick_Time[Fogclick_Index] = "0"
Set Variable Set Fogclick_Unit[Fogclick_Index] = No unit
Set Variable Set Fogclick_Index = (Fogclick_Index - 1)
Set Variable Set Fogclick_Loop = (Fogclick_Loop - 1)
If (Fogclick_Index Equal to 0) then do (Turn off Fogclick_Notification <gen>) else do (Do nothing)
Else - Actions
Fogclick Notification
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
-------- /////This trigger will run if player really use maphack///// --------
For each (Integer Fogclick_Loop ) from 1 to Fogclick_Index , do (Actions)
Loop - Actions
Set Variable Set Fogclick_Time[Fogclick_Loop] = (Fogclick_Time[Fogclick_Loop] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Fogclick_Time[Fogclick_Loop] Equal to 1
Then - Actions
Game - Display to (All players) for 30.00 seconds the text: ((Player + (Name of Fogclick_Player[Fogclick_Loop])) + ( fogclicked + (Name of Fogclick_Unit[Fogclick_Loop])))
Set Variable Set Fogclick_Player[Fogclick_Loop] = Fogclick_Player[Fogclick_Index]
Set Variable Set Fogclick_Time[Fogclick_Loop] = Fogclick_Time[Fogclick_Index]
Set Variable Set Fogclick_Unit[Fogclick_Loop] = Fogclick_Unit[Fogclick_Index]
Set Variable Set Fogclick_Time[Fogclick_Index] = "0"
Set Variable Set Fogclick_Unit[Fogclick_Index] = No unit
Set Variable Set Fogclick_Index = (Fogclick_Index - 1)
Set Variable Set Fogclick_Loop = (Fogclick_Loop - 1)
If (Fogclick_Index Equal to 0) then do (Turn off Fogclick_Notification <gen>) else do (Do nothing)
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.