Jump to content
Sign in to follow this  
zachhox

Starting Locations

Recommended Posts

How can I set 2 starting locations for both US and SLA in Warfare?

So far I have deleted all starting locations except startinglocation0 and startinglocation1 using the editor.

I wanna startinglocation0 for US and startinglocation1 for SLA and placed them in the positions I want them but still it may randomly change when I start a game.

So how can I set them indefinitely in the "Init_StartingLocation.sqs" or "Init_Server.sqs" file?

Thanks.

Share this post


Link to post
Share on other sites

You can remove startinglocations gl's and place new gl's named: westbase, eastbase, resistancebase.

Share this post


Link to post
Share on other sites

So like if this was the file:

AITownDefense = Compile PreprocessFile "Server\AI\AI_TownDefense.sqf"

UpdateSquadRespawn = Compile PreprocessFile "Server\AI\Advanced\Advanced_UpdateSquadRespawn.sqf"

UpdateTownDefense = Compile PreprocessFile "Server\Server_UpdateTownDefense.sqf"

;Compile regular functions

AddFundsToSide = Compile PreprocessFile "Server\Functions\Server_AddFundsToSide.sqs"

GetAITeamID = Compile PreprocessFile "Server\Functions\Server_GetAITeamID.sqf"

StarterSquadMissionStartedMessage = Compile PreprocessFile "Server\Functions\Server_StarterSquadMissionStartedMessage.sqf"

SetCampsToSide = Compile PreprocessFile "Server\Functions\Server_SetCampsToSide.sqf"

SendGameStats = Compile PreprocessFile "Server\Functions\Server_SendGameStats.sqf"

StructureDamaged = Compile PreprocessFile "Server\Functions\Server_StructureDamaged.sqf"

StructureDestroyed = Compile PreprocessFile "Server\Functions\Server_StructureDestroyed.sqf"

eastCommanderVoteTime = VOTETIME

westCommanderVoteTime = VOTETIME

PublicVariable "eastCommanderVoteTime"

PublicVariable "westCommanderVoteTime"

civilianCasualties = 0

eastCasualties = 0

westCasualties = 0

resistanceCasualties = 0

westVehiclesCreated = 0

westVehiclesLost = 0

westUnitsCreated = 0

eastVehiclesCreated = 0

eastVehiclesLost = 0

eastUnitsCreated = 0

resistanceVehiclesCreated = 0

resistanceVehiclesLost = 0

resistanceUnitsCreated = 0

westTimeUnderAttack = 0

eastTimeUnderAttack = 0

[] Spawn SendGameStats

@ (commonFunctionsCompiled)

~1

startingLocations = []

_total = 0

#InitLocation

if (IsNil Format["StartingLocation%1",_total]) then {Goto "PlaceSides"};

startingLocations = startingLocations + [Call Compile Format["StartingLocation%1",_total]]

_total = _total + 1

if (_total < 100) then {Goto "InitLocation"};

#PlaceSides

_eastLocation = startingLocations Select (Random (_total - 1))

_westLocation = startingLocations Select (Random (_total - 1))

if (_eastLocation == _westLocation) then {Goto "PlaceSides"};

if (_eastLocation Distance _westLocation < SIDESTARTINGDISTANCE) then {Goto "PlaceSides"};

eastStartingLocation = _eastLocation

westStartingLocation = _westLocation

PublicVariable "eastStartingLocation"

PublicVariable "westStartingLocation"

EastMHQ SetPos GetPos _eastLocation

WestMHQ SetPos GetPos _westLocation

{Leader _x SetPos ([GetPos _eastLocation,5,25] Call GetRandomPosition)} ForEach eastTeams

{Leader _x SetPos ([GetPos _westLocation,5,25] Call GetRandomPosition)} ForEach westTeams

EastBase = EastMHQ

WestBase = WestMHQ

PublicVariable "EastBase"

PublicVariable "WestBase"

eastMHQDeployed = false

westMHQDeployed = false

PublicVariable "eastMHQDeployed"

PublicVariable "westMHQDeployed"

@ (commonInitComplete)

eastAITeams = eastTeams

westAITeams = westTeams

westKnownSalvage = []

eastKnownSalvage = []

eastAISalvagers = []

westAISalvagers = []

eastAISupplyTrucks = []

westAISupplyTrucks = []

eastBaseStructures = []

westBaseStructures = []

EastAIBase = false

WestAIBase = false

[] Exec "Server\Server_CommandFromClient.sqs"

[] Exec "Server\Config\Config_Resistance.sqs"

[] Exec "Server\Config\Config_BaseLayouts.sqs"

[] Exec "Server\Server_UpdateClientTownValues.sqs"

[] Exec "Server\Server_Update.sqs"

[] Exec "Server\Server_UpdateTime.sqs"

[] Exec "Server\Server_UpdateResources.sqs"

[East] Exec "Server\Server_UpdateBaseRecon.sqs"

[West] Exec "Server\Server_UpdateBaseRecon.sqs"

~1

;Vote for commanders

[East,false] Exec "Server\Server_VoteForCommander.sqs"

[West,false] Exec "Server\Server_VoteForCommander.sqs"

gameInitialized = true

if (Local player && Side player == East) then {Goto "CreateWestRespawn"};

#CreateEastRespawn

CreateMarkerLocal ["Respawn_east",GetPos EastBase]

"Respawn_east" SetMarkerTypeLocal "Empty"

"Respawn_east" SetMarkerColorLocal "ColorGreen"

if (Local player) then {Goto "InitStartSquads"};

#CreateWestRespawn

CreateMarkerLocal ["Respawn_west",GetPos WestBase]

"Respawn_west" SetMarkerTypeLocal "Empty"

"Respawn_west" SetMarkerColorLocal "ColorGreen"

What would I change?

And the names in teh mission edit I for now left on startinglocation0 and startinglocation1.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×