Battlefield Modding Tutorials BFMODS https://battlefieldmodding.com/ssm/phpBB3/ |
|
Attaching a PCO to another PCO or static object https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=3&t=5336 |
Page 1 of 1 |
Author: | samrtguy [ Thu Oct 22, 2009 10:18 pm ] |
Post subject: | Attaching a PCO to another PCO or static object |
I'd like to know if attaching a PCO to a static object is possible excluding all the 3dsMax/Gmax bullshit. I want to make mounted rocket platforms, Pak40s, MGs, and Flak38 on a flat train car (the trainplatform_m1 object the Raid on Agheila map from SWoWWII has). Only the weapons on the wagons would be controllable, not the wagons themselves (all these will do is go forward at the speed of a hanomag's engine, including the coal wagon and locomotive). I'd also like to add statics to the flat cars, like two sandbags on each side of the wagon with mounted MG42's slightly behind them. How is it done? |
Author: | Senshi [ Thu Oct 22, 2009 10:26 pm ] |
Post subject: | Re: Attaching a PCO to another PCO or static object |
Add the PCOs as child objects (like the plane spawners on the aircraft carriers), give them the ObjectTemplate.holdObject 1 line and you have an attached PCO. Should work fine in this case, as you are adding PCOs without mobile physics which cannot "drive away". holdObject forces them to keep their relative position to their parent PCO until sb. enters the child PCO and activates its engines. As stationary weapons don't have engines or mobilephysics at all, this should do the trick without much tedious modding. |
Author: | Apache Thunder [ Fri Oct 23, 2009 4:53 am ] |
Post subject: | Re: Attaching a PCO to another PCO or static object |
Yes. Also, make sure not to attach them directly to the staticobject and instead attach a spawner that spawns it. Otherwise the PCO will show up, but if it's destroyed or the round restarts, it will never respawn and stay gone until the map reloads. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |