Page 1 of 1

*ssm* release button for holdobject 1 on spawners

Posted: Fri Nov 06, 2009 1:19 pm
by freddy
if your using the line ObjectTemplate.holdObject 1 on a spawner you know the engine will brake the hold and let the vehicle drive away. but if you addtemplate a second engine to the vehicle this new engine will be the one that needs to be activated to brake the holding to the spawner. and as you know you can give the addtemplated engine a new input mapping like for example right mouse click.

this way you can build a "release" button

example code

Code: Select all

ObjectTemplate.create ObjectSpawner Enterprise_LcvpSpawner
ObjectTemplate.setObjectTemplate 1 Elco80
ObjectTemplate.setObjectTemplate 2 Elco80
ObjectTemplate.minSpawnDelay 20
ObjectTemplate.maxSpawnDelay 20
ObjectTemplate.TimeToLive 30
ObjectTemplate.Distance 20
ObjectTemplate.spawnOffset 0/0/0
ObjectTemplate.holdObject 1
ObjectTemplate.team 2
ObjectTemplate.MaxNrOfObjectSpawned 3

ObjectTemplate.Active Elco80
ObjectTemplate.AddTemplate KatyushaRocket_Engine

ObjectTemplate.Active KatyushaRocket_Engine
ObjectTemplate.setInputToRoll c_PIAltFire
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setTorque 0.1
in this example i have lowered the KatyushaRocket_Engines Torque to 0.1 as i dont want to use it as a actual engine

Re: *ssm* release button for holdobject 1 on spawners

Posted: Fri Jul 13, 2012 12:30 am
by Swaffy
Is there a way to simply convert the "W" and "S" keys (that release the vehicle) to Fire or AltFire keys?

Re: *ssm* release button for holdobject 1 on spawners

Posted: Fri Jul 13, 2012 7:29 am
by freddy
yep

Code: Select all

ObjectTemplate.Active "your_engine"
ObjectTemplate.setInputToRoll c_PIFire
or
ObjectTemplate.setInputToRoll c_PIAltFire  
viewtopic.php?f=43&t=72