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.
*ssm* placing a "wrecked ship" in a map
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: *ssm* placing a "wrecked ship" in a map
Did you try adding the ship to the ground collision group?
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.
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.
Code: Select all
ObjectTemplate.addToCollisionGroup c_CGLandscape
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.

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.




I have cameras in your head!
Re: *ssm* placing a "wrecked ship" in a map
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.
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.
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: *ssm* placing a "wrecked ship" in a map
You can try remming out entry points and using the PCO ID code to prevent players from switching to the PCO seat(s).



I have cameras in your head!
Re: *ssm* placing a "wrecked ship" in a map
i dont know that one. is it this line ObjectTemplate.GUIIndex ?Apache Thunder wrote: and using the PCO ID code to prevent players from switching to the PCO seat(s).
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: *ssm* placing a "wrecked ship" in a map
No.
They are these commands:
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:
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.
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
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



I have cameras in your head!
Re: *ssm* placing a "wrecked ship" in a map
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!
thanks for help!