Page 1 of 4

Non static object transform to static

Posted: Mon Feb 24, 2014 4:31 pm
by MillerMod
Hi Mates!

Can you tell me how to make an object (for example an apc) to a static object? So the players can not use it.

Re: Non static object transform to static

Posted: Mon Feb 24, 2014 4:41 pm
by freddy
Do you want something that just looks like for example an apc or do you mean like an actual apc that cant drive?

Im not the best with this stuff but i think you can just make a simple object using the apc mesh

There is a fun example in the game with an engine that looks like a boat :)

Code: Select all

rem *** Enterprise_Engine ***
ObjectTemplate.create Engine Enterprise_Engine
ObjectTemplate.geometry Daihatsu_m1   <------------------------------
ObjectTemplate.setNetworkableInfo EnterpriseEngineInfo
ObjectTemplate.setMinRotation 0/0/-4000
ObjectTemplate.setMaxRotation 0/0/5000
ObjectTemplate.setMaxSpeed 0/0/5000
ObjectTemplate.setAcceleration 0/0/5000
ObjectTemplate.setInputToRoll c_PIThrottle
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setEngineType c_ETShip
ObjectTemplate.setTorque 1.5
ObjectTemplate.setDifferential 1.5
ObjectTemplate.setNoPropellerEffectAtSpeed 120

Re: Non static object transform to static

Posted: Mon Feb 24, 2014 10:30 pm
by Vilespring
You can remove all entry points, that way it is still destructible/rammable but cannot be used. You might have to remove the depot if you want it to not give ammo.

Re: Non static object transform to static

Posted: Tue Feb 25, 2014 10:18 am
by MillerMod
freddy wrote:Do you want something that just looks like for example an apc or do you mean like an actual apc that cant drive?

Im not the best with this stuff but i think you can just make a simple object using the apc mesh

There is a fun example in the game with an engine that looks like a boat :)

Code: Select all

rem *** Enterprise_Engine ***
ObjectTemplate.create Engine Enterprise_Engine
ObjectTemplate.geometry Daihatsu_m1   <------------------------------
ObjectTemplate.setNetworkableInfo EnterpriseEngineInfo
ObjectTemplate.setMinRotation 0/0/-4000
ObjectTemplate.setMaxRotation 0/0/5000
ObjectTemplate.setMaxSpeed 0/0/5000
ObjectTemplate.setAcceleration 0/0/5000
ObjectTemplate.setInputToRoll c_PIThrottle
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setEngineType c_ETShip
ObjectTemplate.setTorque 1.5
ObjectTemplate.setDifferential 1.5
ObjectTemplate.setNoPropellerEffectAtSpeed 120
Yepp, i want for example an apc, which just parking next to a building, but it is not driveable, or useable, just stands there.

Re: Non static object transform to static

Posted: Tue Feb 25, 2014 10:19 am
by MillerMod
Vilespring wrote:You can remove all entry points, that way it is still destructible/rammable but cannot be used. You might have to remove the depot if you want it to not give ammo.
Can you pls show me the code ?

Re: Non static object transform to static

Posted: Tue Feb 25, 2014 1:35 pm
by freddy
You can make it as a simple object to, but it would lack some of the attached details (guns and tracks) and as it has no hitpoints so you cant destroy it

Code: Select all

ObjectTemplate.create SimpleObject apc_dummy
ObjectTemplate.geometry Hanomag_Hull_M1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.cullRadiusScale 3.0

Re: Non static object transform to static

Posted: Wed Feb 26, 2014 3:16 am
by Vilespring
This is how I would do it.

Code: Select all


rem *** Dummy_M3A1 ***
ObjectTemplate.create PlayerControlObject Dummy_M3A1
ObjectTemplate.NameTagOffset 0/-0.4/1
ObjectTemplate.setNetworkableInfo M3A1BodyInfo
ObjectTemplate.saveInSeparateFile 1
objectTemplate.cullRadiusScale 5
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.explosionRadius 8
ObjectTemplate.explosionDamage 5
ObjectTemplate.exitTimer 1
ObjectTemplate.drag 2
ObjectTemplate.mass 15000
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.hasArmor 1
ObjectTemplate.speedMod 2
ObjectTemplate.hitpoints 100
ObjectTemplate.maxhitpoints 100
ObjectTemplate.material 45
ObjectTemplate.criticalDamage 16
ObjectTemplate.hpLostWhileCriticalDamage 1.5
ObjectTemplate.explosionForceMod 13
ObjectTemplate.hpLostWhileUpSideDown 10
ObjectTemplate.hpLostWhileDamageFromWater 10
ObjectTemplate.addArmorEffect 50 e_M3a1Damage 0/0.5/2.5
ObjectTemplate.addArmorEffect 16 e_M3a1Fire 0/0.7/3
ObjectTemplate.addArmorEffect 0 e_ExplGas 0/0/0
ObjectTemplate.addArmorEffect 0 e_scrapmetal 0/0/0
ObjectTemplate.addArmorEffect -1 WaterWaterExplosion 0/0/0
ObjectTemplate.damageFromWater 1
ObjectTemplate.aiTemplate M3A1
rem -------------------------------------
ObjectTemplate.addTemplate lodDummy_M3A1
rem -------------------------------------
ObjectTemplate.setSoldierExitLocation -2/0/0 0/0/0
ObjectTemplate.GUIIndex 22
ObjectTemplate.setVehicleIcon "Vehicle/Icon_m3a1.tga"
ObjectTemplate.setVehicleIconPos 40/81
ObjectTemplate.setPrimaryAmmoBar ABNone
ObjectTemplate.setCrossHairType CHTNone
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleType  VTApc
ObjectTemplate.setToolTipType  TTApc
ObjectTemplate.setMinimapIcon "Minimap/minimap_icon_apc_16x16.tga"
ObjectTemplate.hasRestrictedExit 1


rem *** lodDummy_M3A1 ***
ObjectTemplate.create LodObject lodDummy_M3A1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate Dummy_M3A1Complex
ObjectTemplate.addTemplate M3A1Simple
ObjectTemplate.addTemplate M3A1Wreck
rem -------------------------------------
ObjectTemplate.lodSelector M3A1LodSelector


rem *** Dummy_M3A1Complex ***
ObjectTemplate.create Bundle Dummy_M3A1Complex
ObjectTemplate.geometry M3A1_Hull_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate lodM3A1Cockpit
ObjectTemplate.addTemplate M3A1Seat
ObjectTemplate.setPosition -0.419/0.3/0.95
ObjectTemplate.addTemplate M3A1Camera
ObjectTemplate.setPosition -0.609/0.64/1.42
ObjectTemplate.addTemplate M3A1FrontDoor
ObjectTemplate.setPosition 0.92/0.13/1.38
ObjectTemplate.setRotation -27.999/0/0
ObjectTemplate.addTemplate M3A1FrontDoor
ObjectTemplate.setPosition -0.919/0.13/1.38
ObjectTemplate.addTemplate M3A1BackDoor
ObjectTemplate.setPosition 0.35/0.4/-2.749
ObjectTemplate.addTemplate M3A1Wheel1
ObjectTemplate.setPosition -0.449/0.15/3
ObjectTemplate.addTemplate M3A1Wheel1
ObjectTemplate.setPosition 0.45/0.15/3
ObjectTemplate.setRotation -179.999/0/0
ObjectTemplate.addTemplate M3A1Engine
rem -------------------------------------
I removed the entrances, supply/health depot, and other positions in the vehicle. It won't have the browning on it, but what use would it be?
it would still be pushable and destructible; it would act like an empty M3A1

Re: Non static object transform to static

Posted: Wed Feb 26, 2014 3:34 am
by BotHunter
What about setting the entry radius to zero?

Re: Non static object transform to static

Posted: Wed Feb 26, 2014 4:22 am
by Vilespring
BotHunter wrote:What about setting the entry radius to zero?
that would work too, but there 6(?) positions in it, and you would have to set all of them to 0, so I just did what I did just to simplify it.
but, if all the positions use the same entry, it would work well. I also wanted to remove the ammo depot in it.

Now, it still can be driven, but it has to be entered on spawn or fired as a projectile, but it would just drive, as it has only one position.

I made a version of a Sherman in my crazy mod that was RC and was only usable by a command Sherman. The command tank would spawn a Sherman that has no top MG, and no entry points, so when your driving the RC tank, and hit E, your now driving the command tank, and disconnected from the RC one. An abandoned RC tank is unusable, so all it does is act as cover.

Re: Non static object transform to static

Posted: Fri Feb 28, 2014 4:48 am
by Vilespring
did it work?