Have any of you modders been able to add a
static object to a map server sided and the clients were able to
see it ?
Would the following code idea help ?
In the Conquest, CTF or TDM folder. . .
ObjectSpawns.con
rem *** extra hanger ssm ***
Object.create hangerSpawner
Object.absolutePosition 612/39.8/1478
Object.rotation 90/0/0
Object.setTeam 3
ObjectTemplate.HoldObject 1
-----------------------------------------------
ObjectSpawnTemplate.con
rem *** extra hanger ssm ***
ObjectTemplate.create ObjectSpawner hangerSpawner
ObjectTemplate.setObjectTemplate 3 hangar1_m1
ObjectTemplate.MinSpawnDelay 0
ObjectTemplate.MaxSpawnDelay 0
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 9999
ObjectTemplate.Distance 9999
ObjectTemplate.DamageWhenLost 0
-----------------------------------------------
In the map folder. . .
Init.con
run objects/objects
-----------------------------------------------
In the Objects folder. . .
Objects.con
run Hangar/Hangar
-----------------------------------------------
hanger.con
run objects
run geometries
------------------------------------------------
Geometries.con
GeometryTemplate.create StandardMesh hangar1_m1
GeometryTemplate.file hangar1_m1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 15
GeometryTemplate.setLodDistance 2 35
GeometryTemplate.setLodDistance 3 60
GeometryTemplate.setLodDistance 4 100
GeometryTemplate.setLodDistance 5 300
-------------------------------------------------
Objects.con
ObjectTemplate.create Bundle hangar_m1
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.addTemplate lodhangar
LodSelectorTemplate.create DistanceSelector hangarSelector
LodSelectorTemplate.addLodDistance 100
ObjectTemplate.create LodObject lodhangar
ObjectTemplate.lodselector hangarSelector
ObjectTemplate.create SimpleObject hangarExterior
ObjectTemplate.geometry hangar1_m1
*NOTE*
Notice how we are NOT including the
interrior parts or the repair aspects of this object.
We are simply creating a "simple" object so as NOT to instruct the client files to render and add object properties to the spawned object such as additional inside objects or repair characteristics, simply just spawn this object and render it as instructed in the above parameters.
Editing a map's "
StaticObjects.con" for the server file will NOT render the object for the client, it will only place it in the map but it will be
invisable to the clients. ( not really a fair thing to do ) lol
The above codes are just
my idea on how one would add static objects to a map server sided.
I learned a lot of mapping techniques from reading this informative website / forum and I hope my "code idea" points you in the right direction.
I am going to test this code on my server and let you know how it turns out.