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.
Events

Time - YourTimer expires
Events

Time - Every 30.00 seconds of game time
Spawn P1

Events


Time - Every 30.00 seconds of game time

Conditions

Actions


Set VariableSet TempGroup = (Units in P1Build <gen>)


Set VariableSet TempPoint = (Center of P1Spawn <gen>)


Unit Group - Pick every unit in TempGroup and do (Actions)



Loop - Actions




Unit - Create 1 (Unit-type of (Picked unit)) for Player 1 (Red) at TempPoint facing Default building facing degrees


Custom script: call DestroyGroup(udg_TempGroup)


Custom script: call RemoveLocation(udg_TempPoint)
Events

Map initialization
Actions

Set Variable BuildRegion[1] = P1Build <gen>

Set Variable BuildRegion[2] = P2Build <gen>

Set Variable BuildRegion[3] = P3Build <gen>

Set Variable SpawnRegion[1] = P1Spawn <gen>

Set Variable SpawnRegion[2] = P2Spawn <gen>

Set Variable SpawnRegion[3] = P3Spawn <gen>
Events

Time - Every 10.00 seconds of game time
Actions

Player Group - Pick every player in ActivePlayers and do (Actions)


Loop - Actions



Set Variable TempPoint = (Center of BuildRegion[(Player number of (Picked player))])



Unit - Create 1 Paladin for (Picked player) at TempPoint facing Default building facing degrees



Custom script: call RemoveLocation(udg_TempPoint)
Set VariableSet TempGroup = (Units in P1Build <gen> matching (Matching unit) is a Building Equal to False)
Spawn P1

Events


Time - Every 30.00 seconds of game time

Conditions

Actions


Set Variable TempGroup = (Units in P1Build <gen> matching...)


Set Variable BuildPoint = (Center of P1Build <gen>)


Set Variable SpawnPoint = (Center of P1Spawn <gen>)


Unit Group - Pick every unit in TempGroup and do (Actions)



Loop - Actions




Set Variable UnitPoint = (Position of (Picked unit))




Set Variable Distance = (Distance between UnitPoint and BuildPoint)




Set Variable Angle = (Angle between UnitPoint and BuildPoint)




Set Variable CreatePoint = (SpawnPoint offset by Distance towards Angle degrees)




Unit - Create 1 (Unit-type of (Picked unit)) for Player 1 (Red) at CreatePoint facing Default building facing degrees




Custom script: call RemoveLocation(udg_UnitPoint)




Custom script: call RemoveLocation(udg_CreatePoint)


Custom script: call DestroyGroup(udg_TempGroup)


Custom script: call RemoveLocation(udg_BuildPoint)


Custom script: call RemoveLocation(udg_SpawnPoint)
Spawn

Events


Time - Every 30.00 seconds of game time

Conditions

Actions


Set VariableSet BuildedP1 = (Units in UnitsP1 <gen> matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A Hero) Equal to False) and (((Matching unit) is A peon-type unit) Equal to False))))


Set VariableSet SpawnT1 = SpawnSpotT1 <gen>


Unit Group - Pick every unit in BuildedP1 and do (Actions)



Loop - Actions




Unit - Create 1 (Unit-type of (Picked unit)) for Player 1 (Red) at (Center of SpawnSpotT1 <gen>) facing Default building facing degrees


Custom script: call DestroyGroup(udg_BuildedP1)


Custom script: call RemoveLocation(udg_SpawnT1)
Some of your variables were wrong so I fixed those. I also found some minor issues in your triggers and fixed them/cleaned them up.I've lost in all this stuff, its not working and i can't understand why
If you mind, can you take a look?
function BuildabilityFix takes rect r returns nothing
local real minX = GetRectMinX(r)
local real maxX = GetRectMaxX(r)
local real minY = GetRectMinY(r)
local real resetX = minX + 16
local real x = resetX
local real y = GetRectMaxY(r) - 16
loop
call SetTerrainPathable(x, y, PATHING_TYPE_AMPHIBIOUSPATHING, false)
set x = x + 32
if x > maxX then
set x = resetX
set y = y - 32
exitwhen y < minY
endif
endloop
endfunction
It's impossible to make them act like Computers without literally making them Computers.So the last question left at the moment - how to make spawned units belong to computer whitout making P3 and P4 computer? If this is posible of course.
Setup Computer Allies

Events


Time - Elapsed game time is 0.01 seconds

Conditions

Actions


-------- Set each User's computer player: --------


Set VariableSet AlliedPlayer[1] = Player 13 (Maroon)


Set VariableSet AlliedPlayer[2] = Player 14 (Navy)


Set VariableSet AlliedPlayer[3] = Player 15 (Turquoise)


Set VariableSet AlliedPlayer[4] = Player 16 (Violet)


-------- Set each Computer's user player: --------


Set VariableSet AlliedPlayer[13] = Player 1 (Red)


Set VariableSet AlliedPlayer[14] = Player 2 (Blue)


Set VariableSet AlliedPlayer[15] = Player 3 (Teal)


Set VariableSet AlliedPlayer[16] = Player 4 (Purple)


-------- Change their colors/names: --------


For each (Integer A) from 1 to 4, do (Actions)



Loop - Actions




Player - Change color of AlliedPlayer[(Integer A)] to (Color of (Player((Integer A)))), Changing color of existing units




Player - Set name of AlliedPlayer[(Integer A)] to (Name of (Player((Integer A))))
