confusion with response/mobile physics etc...

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

confusion with response/mobile physics etc...

Post by fo0k »

I will explain what im trying to do.. without explaining why.. because this post will go on forever if i do.

I am add templating a spawner object to a car... much like a LCVP on a ship//

added the objectspawner template to the parent vehicle... and add templated the spawner to it.

This work fine with 'hold object'

basically i have a car.. that spawns another car on top.. and you can then drive about with a car floating above..

problem is that I dont want to spawn a full car above... just a very simple object (a cube for example..)

I can create a static spawner object like this no problem.. but when it spawns on the car... the car drives off and the spawned object no longer 'holds' onto the parent vehicle..

what is it about a pco that means it can or cant 'hold' onto something? Im guessing response/mobile physics.. but i have tried adding this to my 'cube' and it does not work.

I hope this makes some sense.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

you need ObjectTemplate.setNetworkableInfo to

ObjectTemplate.hasMobilePhysics 1 <--- muzt have
ObjectTemplate.hasCollisionPhysics 1 <----- up to you
ObjectTemplate.hasResponsePhysics 1 <---- not sure

edit: that was a bit crappy explanation but basicallly you need the NetworkableInfo so the server can keep track of things and report to the players where the object is on the map

rip the settings from a jeep or something :)
mrhowdoimodClassic
Posts: 31
Joined: Fri Oct 29, 2010 7:36 pm
Location: World Loc: 0,0,0
Contact:

Re: confusion with response/mobile physics etc...

Post by mrhowdoimodClassic »

well AFAI remember something held with 'hold object' would stay unless either 1) The player entered and activated an engine. or 2) was hit by a projectile.

So my idea is maybe you could encorperate an engine into all this you could find a way to do it. Or better yet, have one of the cars button inputs fire a projectile directly at said object held with 'hold object' and gave it a special material that only affected that object. then you could fire that projectile to release the object.

Basically something (an outside source) needs to affect that object with motion before it will fall.
_____________________________________________
Thanks so much for the years of support and friendship to both: SSM.com and it's legacy, BFMods.com
Sincerely, John P. Harrell
_____________________________________________
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: confusion with response/mobile physics etc...

Post by Apache Thunder »

The minimum requirements to use hold object command:

1. Object must be a PCO (obvious)
2. Object must have network info.
3. Object must have mobile physics for command to work correctly in mutliplayer.
4. Object must have an engine addtemplated to it.


Most issues are the result of not addtemplating an engine (you can make a dummy engine that has no power to it, but there must be one). The game determines when to release the object by when the engine is activated. The engine could have custom throttle controls for example. Thus it won't release until whatever controls coded for that engine is used. So if you have no engine on the object, the game won't hold the object anymore since it doesn't know when to release it, so it never holds it.

I'm not sure if responsePhysics is needed or not, but to be safe, add one. Most if not all vehicles have this command, thus it is safe to say you can add this command without adverse effect to your spawner configuration.
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: confusion with response/mobile physics etc...

Post by fo0k »

Apache Thunder wrote: 4. Object must have an engine addtemplated to it.
Not tried yet but this sooo looks like what I'm missing!

thanks all.. :)
Post Reply