*ssm* placing a "wrecked ship" in a map

Ask questions, discuss ideas, get answers
Post Reply
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

*ssm* placing a "wrecked ship" in a map

Post by freddy »

some years ago (read many) i tried to disable a ship and place it to look like an old wreck, the problem was when i tried to put it a bit down the ground it just started to vibrate and jump around like crazy. now i was thinking of try again so wonder if anyone has any ideas how to go ahead with this.

it must be serverside modded unfortunately or else it may had been (much)easier.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: *ssm* placing a "wrecked ship" in a map

Post by Apache Thunder »

Did you try adding the ship to the ground collision group?

Code: Select all

ObjectTemplate.addToCollisionGroup c_CGLandscape
It prevents it from colliding with the terrain at all. If the object has any child objects like wheels springs floaters and such, you may need to add this to them too.

I played around with this code once and manage to get soldiers and other vehicles to fall to the bottom of the world. I believe it also turns off collision with water too.

Since this is collision related, it should work fine as a server side mod.

This collision group was never used in vanilla BF1942 and thus not many modders know about it. :P

Also did you try turning off mobile physics? I think turning on mobile physics doesn't work server side but turning it off might work. Give it a try too if the collision group code doesn't work out for you. Just make sure not to turn off mobile physics for anything that has springs. The game will CTD because springs don't like being tied to a non mobile objects. :P
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: *ssm* placing a "wrecked ship" in a map

Post by freddy »

thanks, that sounds exactly what i´m looking for!

now i´m curious how it looks like at the bottom of the world ;)

i got a follow up question now, is it possible to lock certain pco´s so they cant be used, in for example the Lcvp? like this one: LcvpPassangerPCO3, i guess not as it has networkinfo on it. maybe if i rem it out from the serverfiles, hm testing ahead lol.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: *ssm* placing a "wrecked ship" in a map

Post by Apache Thunder »

You can try remming out entry points and using the PCO ID code to prevent players from switching to the PCO seat(s).
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: *ssm* placing a "wrecked ship" in a map

Post by freddy »

Apache Thunder wrote: and using the PCO ID code to prevent players from switching to the PCO seat(s).
i dont know that one. is it this line ObjectTemplate.GUIIndex ?
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: *ssm* placing a "wrecked ship" in a map

Post by Apache Thunder »

No.

They are these commands:

Code: Select all

ObjectTemplate.setPcoId 0
ObjectTemplate.addPcoPosId 0

rem *** This command is unused. I have never seen it used. ***
ObjectTemplate.pcoflags 0
I don't know much on how they work, but I believe you place the setPCOID command on all the pcos you want to lock out (you must also put this on the main PCO too). The driver PCO id will be 0 and each additiional PCO id will 1, 2, 3, etc. (no two pcos should have the same ID)

Then you use the addPCOPosid command to add other PCO IDs to the passenger PCO(s) of your choice.

I believe this tells the PCOs you put it on which PCOs you can't switch too. So if you have the driver pco the only one you want to use then add the PCO ids from all other passenger PCOs to the driver PCO and it should prevent you from switching to them. (also make sure all the PCOs in question have an ID set for them!)

Example code:

Code: Select all


rem *** Primary PCO. The main vehicle. ***
ObjectTemplate.create PlayerControlObject ExampleDriverPCO
ObjectTEmplate.setPCOId 0
ObjectTemplate.addPcoPosId 1
ObjectTemplate.addPcoPosId 2

rem *** Passenger PCOs ***
ObjectTemplate.create PlayerControlObject ExamplePassengerPCO1
ObjectTEmplate.setPCOId 1
ObjectTemplate.addPcoPosId 0
ObjectTemplate.addPcoPosId 2

ObjectTemplate.create PlayerControlObject ExamplePassengerPCO2
ObjectTEmplate.setPCOId 2
ObjectTemplate.addPcoPosId 0
ObjectTemplate.addPcoPosId 1
As for the PCOFlags command....it is not used for this purpose. It has another purpose that is unknown to me right now as I have never seen it used anywhere nor have I tried it before.
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: *ssm* placing a "wrecked ship" in a map

Post by freddy »

will try some and see what i get from it. why i im asking bout locking pco´s is that i thought it could be cool if you could have a "scrapped" Lcvp lying around at the beach and still be able to use the mg only.

thanks for help!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

this code was fun, turned the Lcvp into a speedboat :D

took some tries to beach it nice when testing

Post Reply