pcc 14 Posted June 30, 2017 At the beginning of the warfare game resistance patrol teams are spawned at depot, but only once. I'm want them to spawn repeatedly even after they lose the location to west or east. I've tried adding [Resistance,_location] Spawn BIS_WF_UpdateTownPatrols; in Server_UpdateTownVirtualDefenses.sqf //Reinforce garrison. if (time >= _timeNextUpdate) then { _timeNextUpdate = time + 300; _location SetVariable[Format["%1GarrisonCommand",_sideText],VGCOMMANDREINFORCE]; [Resistance,_location] Spawn BIS_WF_UpdateTownPatrols; }; But they stop spawning after the location is captured by west or east. Share this post Link to post Share on other sites
Sgt.Spunkmeyer 14 Posted July 9, 2017 You shouldn't use Time for respawning units without control. You should use "Count of units" or death because if you stay long time using the condition "time" the mission or server will overflow and that will cause lag and low fps. https://community.bistudio.com/wiki/countSide 1 Share this post Link to post Share on other sites
opusfmspol 282 Posted July 12, 2017 Town patrols are only managed for the owning side. What you want done would have to be a custom server update script. You would build it from scratch. 1) Build a starter script, something not very complicated. It will become the compiled function. It's an update function so give it some starter stuff, and finish with a "while {!gameOver} do {looped code}" which has a sleep delay and uses the starter stuff. 2) If you're running a custom server init script copied from Warfare, you can add it into the mix there to compile and spawn it; or you could add something like this to a WF custom common init: if (isServer) then { // use spawn so mission won't hang during loading due to the 'waitUntil'. _niv = [] spawn { PCC_ResistanceTownSpawnFunc = Compile PreprocessFileLineNumbers ("Server\Functions\Server_ResistanceTownSpawns.sqf"); waitUntil {gameInitialized}; [] Spawn PCC_ResistanceTownSpawnFunc; }; }; If adding to a WF server script, only the lines 6 (compile preprocess) and 8 (spawn) would get added into the mix. Compile it with the other functions and spawn it after teams and towns get initialized. 3) Test run and edit as needed to make sure the simple compiled function is running properly. 4) Then edit the function as much as you want until it finally does what you want it to do. Be sure cleanup of the spawned units is included when killed or no players are around. 1 Share this post Link to post Share on other sites