This would be a good idea for a changing infantry map and it is possible. I have a map where statics are converted to pcos and they are controlled server side. They spawn on flags. This is how I have it set up.
http://www.mediafire.com/download/25or7 ... ics_r1.rar
In objects.con of the static object, the object name of the simpleobject is renamed simply by adding _server to the end of the name, easy to differentiate. And instead of simpleobject, the template is playercontrolobject. I also had to create and include a new networkable info code. Then all of the pcos have an objectspawner coded in ObjectSpawnTemplates.con All is included in the client .rfa
as for objectspawns.con it's not neccesary to have it filled with code in the client.rfa this is where we proceed with adding this file to the map_001.rfa with the objects position.
Code: Select all
objects.con
ObjectTemplate.create PlayerControlObject bigrock1_server
ObjectTemplate.geometry bigrock1
ObjectTemplate.setNetworkableInfo bigrock1_serverBodyInfo
ObjectTemplate.setHasCollisionPhysics 1
network.con
NetworkableInfo.createNewInfo bigrock1_serverBodyInfo
NetworkableInfo.setPredictionMode PMLinear
ObjectSpawnTemplates.con
ObjectTemplate.create ObjectSpawner airport_runway_server
ObjectTemplate.setObjectTemplate 1 airport_runway
ObjectTemplate.setObjectTemplate 2 airport_runway
ObjectTemplate.MinSpawnDelay 9999
ObjectTemplate.MaxSpawnDelay 10000
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 9999
ObjectTemplate.Distance 9999
ObjectTemplate.DamageWhenLost 1
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.teamOnVehicle 0
There can be a lot more done to this. team 2 has different objects than team 1 spawning on a flag; random object spawn locations. I did not go in that depth. That would be great for a counter strike like mod. I tested this code online.