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

Events


Time - Elapsed game time is 1.00 seconds

Conditions

Actions


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



Loop - Actions




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





If - Conditions






(Player number of (Picked player)) Equal to 1





Then - Actions






Game - Defeat (Picked player) with the message: No SinglePlayer !





Else - Actions
NoSinglePlayer

Events


Time - Elapsed game time is 0.01 seconds

Conditions

Actions


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



Loop - Actions




Set Int = Int + 1


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



If - Conditions




Int = 1



Then - Actions




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





Loop - Actions






Game - Defeat (Picked player) with the message: No SinglePlayer !
Events

Time - elapsed in game is 0.00 seconds
Conditions
Actions

Custom script: if ReloadGameCacheFromDisc() then

Custom script: call EndGame(false)

Custom script: endif
No map is protected, only damaged.
HI again...
I need a trigger that finishes the game if there is only one player in the game when the game starts.
+rep for help!
This would work best (detects if game is offline rather than checking player count).
Events
Time - elapsed in game is 0.00 seconds
Conditions
Actions
Custom script: if ReloadGameCacheFromDisc() then
Custom script: call EndGame(false)
Custom script: endif
scope disableSaveLoad initializer i
private function i takes nothing returns nothing
local integer index=0
local integer counter=0
loop
exitwhen index>11
if GetPlayerSlotState(Player(index))==PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(index))==MAP_CONTROL_USER then
set counter=counter+1
endif
set index=index+1
endloop
if counter<2 then
call DisableTrigger(saveLoad)
endif
endfunction
endscope
I doubt he wants Jass, he seems like a gui'r
Still, reatek, if you want to use above, convert a blank trigger to custom script, you'll need to make the variables though
