Jump to content
Sign in to follow this  
KimJongIll

Placing Howitzers on the side of a C130J

Recommended Posts

Hey all I have been doing some crazy editing stuff with the attachto script (eg: m2 on the heads of riflemen, bus with guns on the top ural with a howitzer in the back, a motorcycle with mk13s.) and recently I have been experimenting with the C130J. After experimentation it seems that you can only have objects floating in space or on the top. Is there any way to rorate a howitzer so that it is vertically oriented and can be on the side of the plane?

Share this post


Link to post
Share on other sites

yes and no; you can rotate an object using setvector command but the crew will jump out when the angle becomes too great this includes the pitch of the aircraft.

unitname setVectorup [0,1,0.3]

Share this post


Link to post
Share on other sites

have you looked at BIS_fnc_setPitchBank;

i use it to set backpack to the from of a players body when halo-ing

Share this post


Link to post
Share on other sites

You can rotate the attached object in the horizontal plane using setDir, and control its pitch using setVectorUp. See the sample code below:

			// Attach it to the vehicle's side
			_foliage attachTo [_vehicle, [_sx + _x_noise, _sy + _y_noise, _sz + _z_noise]];
			// Rotate the plant to its best orientation
			_foliage setDir (_fol_orientation + _angle_noise + (_side * 90));
			// Flip it upside down
			_foliage setVectorUp [_p_noise * _side, _nearZero, -1.0];

William

Share this post


Link to post
Share on other sites
yes and no; you can rotate an object using setvector command but the crew will jump out when the angle becomes too great this includes the pitch of the aircraft.

This command might help with that: allowCrewInImmobile

Someone mentioned it in a thread recently. I haven't used it so it may not work but it is worth a shot.

Share this post


Link to post
Share on other sites
This command might help with that: allowCrewInImmobile

Someone mentioned it in a thread recently. I haven't used it so it may not work but it is worth a shot.

I've tried that along with forcing the unit back in with eventhandler and enablesimulation false and a few other things as well. None of them work.

About the only thing that did work was to attach an invisible aircraft, you can vector those down without the crew bailing.

Share this post


Link to post
Share on other sites

---------- Post added at 21:24 ---------- Previous post was at 21:23 ----------

Thanks for everyone's help! this definitely answered my question.

---------- Post added at 21:26 ---------- Previous post was at 21:24 ----------

Good to see you coding instead of running N Korea !

After I passed away and entered the Matrix I turned my attention to ARMA.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×