Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function SetImmovableUnitFacing takes unit u, real a returns nothing

call SetUnitPosition(u, GetUnitX(u), GetUnitY(u))

call SetUnitFacing(u, a)
endfunction
function Trig_SetFacingAngles_Enum takes nothing returns boolean

local unit u = GetFilterUnit()

local string s = GetEventPlayerChatString()

if IsUnitAlly(u,GetTriggerPlayer()) and GetWidgetLife(u)>0.405 then


call SetUnitFacing(u,S2R(SubString(s,7,StringLength(s))))

endif

set u = null

return false
endfunction
function Trig_SetFacingAngles_Actions takes nothing returns boolean

local group g = CreateGroup()

call GroupEnumUnitsSelected(g,GetTriggerPlayer(),Filter(function Trig_SetFacingAngles_Enum))

call DestroyGroup(g)

set g = null

return false
endfunction
function InitTrig_SetFacingAngles takes nothing returns nothing

local trigger t=CreateTrigger()

local integer i=0

loop


exitwhen i>11


call TriggerRegisterPlayerChatEvent(t,Player(i),"-angle",false)


set i=i+1

endloop

call TriggerAddCondition(t,Condition(function Trig_SetFacingAngles_Actions))

set t = null
endfunction
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -angle as A substring


Player - Player 2 (Blue) types a chat message containing -angle as A substring


Player - Player 3 (Teal) types a chat message containing -angle as A substring


Player - Player 4 (Purple) types a chat message containing -angle as A substring


Player - Player 5 (Yellow) types a chat message containing -angle as A substring


Player - Player 6 (Orange) types a chat message containing -angle as A substring


Player - Player 7 (Green) types a chat message containing -angle as A substring


Player - Player 8 (Pink) types a chat message containing -angle as A substring


Player - Player 9 (Gray) types a chat message containing -angle as A substring


Player - Player 10 (Light Blue) types a chat message containing -angle as A substring


Player - Player 11 (Dark Green) types a chat message containing -angle as A substring


Player - Player 12 (Brown) types a chat message containing -angle as A substring

Conditions

Actions


Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Owner of (Picked unit)) Equal to (Triggering player)





Then - Actions






Unit - Make (Picked unit) face (Real((Substring((Entered chat string), 8, (Length of (Entered chat string)))))) over 0.01 seconds





Else - Actions
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -angle as A substring


Player - Player 2 (Blue) types a chat message containing -angle as A substring


Player - Player 3 (Teal) types a chat message containing -angle as A substring


Player - Player 4 (Purple) types a chat message containing -angle as A substring


Player - Player 5 (Yellow) types a chat message containing -angle as A substring


Player - Player 6 (Orange) types a chat message containing -angle as A substring


Player - Player 7 (Green) types a chat message containing -angle as A substring


Player - Player 8 (Pink) types a chat message containing -angle as A substring


Player - Player 9 (Gray) types a chat message containing -angle as A substring


Player - Player 10 (Light Blue) types a chat message containing -angle as A substring


Player - Player 11 (Dark Green) types a chat message containing -angle as A substring


Player - Player 12 (Brown) types a chat message containing -angle as A substring

Conditions

Actions


Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Triggering unit) is A structure) Equal to True






(Owner of (Picked unit)) Equal to (Triggering player)





Then - Actions






Custom script: call SetUnitX(Picked Unit, GetUnitX(PickedUnit))






Unit - Make (Picked unit) face (Real((Substring((Entered chat string), 8, (Length of (Entered chat string)))))) over 0.01 seconds





Else - Actions
Custom script: call SetUnitX(Picked Unit, GetUnitX(PickedUnit))
Custom script: call SetUnitX(GetEnumUnit(), GetUnitX(GetEnumUnit()))
Custom script: call SetUnitPosition(GetEnumUnit(), GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()))
RotateBuildingsTest

Events


Player - Player 1 (Red) Selects a unit

Conditions

Actions


Custom script: call SetImmovableUnitFacing(GetTriggerUnit(), udg_rotation90)
sry if its a silly question, but im new in these map making things, so what is map's header?
