import("ScarUtil.scar")function OnGameSetup() --Disables annhiliate mod g_CheckAnnihilate = false endfunction OnInit() --Give resources Player_SetResource(player1, RT_Munition, 650) Player_SetResource(player2, RT_Munition, 650) Player_SetResource(player3, RT_Munition, 650) Player_SetResource(player4, RT_Munition, 650) Player_SetResource(player5, RT_Munition, 650) Player_SetResource(player6, RT_Munition, 650) --Override Popcap Player_SetPopCapOverride(player1, 255) Player_SetPopCapOverride(player2, 255) Player_SetPopCapOverride(player3, 255) Player_SetPopCapOverride(player4, 255) Player_SetPopCapOverride(player5, 255) Player_SetPopCapOverride(player6, 255) --enable upgrades Player_SetAbilityAvailability(player1, BP_GetAbilityBlueprint("abilities/ally_throw_grenade.lua"), ITEM_UNLOCKED) Player_SetAbilityAvailability(player1, BP_GetAbilityBlueprint("abilities/ally_throw_sticky_bombs.lua"), ITEM_UNLOCKED) Player_SetAbilityAvailability(player2, BP_GetAbilityBlueprint("abilities/axis_throw_grenade.lua"), ITEM_UNLOCKED) --Spawnarmies sg_allied_forces = SGroup_CreateIfNotFound("sg_allied_forces") Util_CreateSquadsAtMarker(player1, sg_allied_forces, SBP.ALLIES.RIFLEMEN, mkr_1, 5) Util_CreateSquadsAtMarker(player1, sg_allied_forces, SBP.ALLIES.RANGER, mkr_1, 4) Util_CreateSquadsAtMarker(player1, sg_allied_forces, SBP.ALLIES.SHERMAN, mkr_1, 4) Cmd_Move(sg_allied_forces, mkr_2) sg_axis_forces = SGroup_CreateIfNotFound("sg_axis_forces") Util_CreateSquadsAtMarker(player2, sg_axis_forces, SBP.AXIS.VOLKSGRENADIER, mkr_2, 6) Util_CreateSquadsAtMarker(player2, sg_axis_forces, SBP.AXIS.GRENADIER, mkr_2, 5) Util_CreateSquadsAtMarker(player2, sg_axis_forces, SBP.AXIS.PANZER, mkr_2, 3) Cmd_Move(sg_axis_forces, mkr_1) end
for i = 1, World_GetPlayerCount() do local player = World_GetPlayerAt(i); Player_SetResource(player, RT_Munition, 650) end
-- Imports all the important scar helper functions and stuff for our useimport("ScarUtil.scar")function OnGameSetup()-- disable annihilate check that ends game if no critical buildings are in game g_CheckAnnihilate = false-- define player variables used by various functions player1 = World_GetPlayerAt(1) player2 = World_GetPlayerAt(2)-- add as many as you want.end
-- Imports all the important scar helper functions and stuff for our useimport("ScarUtil.scar")function OnGameSetup()-- disable annihilate check that ends game if no critical buildings are in game g_CheckAnnihilate = false-- define player variables used by various functions player1 = World_GetPlayerAt(1) player2 = World_GetPlayerAt(2) player3 = World_GetPlayerAt(3) player4 = World_GetPlayerAt(4) player5 = World_GetPlayerAt(5) player6 = World_GetPlayerAt(6)endfunction OnInit()-- give all players the Munfor i = 1, World_GetPlayerCount() do local Plr = World_GetPlayerAt(i); Player_SetResource(player, RT_Munition, 650)end-- override popfor i = 1, World_GetPlayerCount() do local Plr = World_GetPlayerAt(i); Player_SetPopCapOverride(plr, 255)end-- Unlock nades, stickies etc.local player = Game_GetLocalPlayer() if Player_GetRace(player) == 0 or Player_GetRace(player) == 1 then for i = 1, World_GetPlayerCount() do local plr = World_GetPlayerAt(i); Player_SetAbilityAvailability(plr, BP_GetAbilityBlueprint("abilities/ally_throw_grenade.lua"), ITEM_UNLOCKED) Player_SetAbilityAvailability(plr, BP_GetAbilityBlueprint("abilities/ally_throw_sticky_bombs.lua"), ITEM_UNLOCKED) elseif Player_GetRace(player) == 2 or Player_GetRace(player) == 3 then Player_SetAbilityAvailability(player2, BP_GetAbilityBlueprint("abilities/axis_throw_grenade.lua"), ITEM_UNLOCKED) end-- spawn armiesfor i = 1, World_GetPlayerCount() do Local Plr = World_GetPlayerAt(i) if Player_GetRace(Plr) == 0 or Player_GetRace(Plr) == 1 then sg_allied_forces = SGroup_CreateIfNotFound("sg_allied_forces") Util_CreateSquadsAtMarker(Plr, sg_allied_forces, SBP.ALLIES.RIFLEMEN, mkr_1, 5) Util_CreateSquadsAtMarker(plr, sg_allied_forces, SBP.ALLIES.RANGER, mkr_1, 4) Util_CreateSquadsAtMarker(plr, sg_allied_forces, SBP.ALLIES.SHERMAN, mkr_1, 4) Cmd_Move(sg_allied_forces, mkr_2) elseif Player_GetRace(Plr) == 2 or Player_GetRace(Plr) == 3 then sg_axis_forces = SGroup_CreateIfNotFound("sg_axis_forces") Util_CreateSquadsAtMarker(plr, sg_axis_forces, SBP.AXIS.VOLKSGRENADIER, mkr_2, 6) Util_CreateSquadsAtMarker(plr, sg_axis_forces, SBP.AXIS.GRENADIER, mkr_2, 5) Util_CreateSquadsAtMarker(plr2, sg_axis_forces, SBP.AXIS.PANZER, mkr_2, 3) Cmd_Move(sg_axis_forces, mkr_1) endendendScar_AddInit(OnInit)