Data Realms Fan Forums
http://45.55.195.193/

[Needs Lock] Orientating Rounds?
http://45.55.195.193/viewtopic.php?f=1&t=17744
Page 1 of 1

Author:  Fat Zombie [ Fri Feb 05, 2010 7:05 pm ]
Post subject:  [Needs Lock] Orientating Rounds?

Could a mod please lock this?

Hey ho.

I'm working on a new mod, a medium-range mortar, and I was wondering if there was a solution to a small bug I'm having.

I have most of the basics figured out (getting it to shoot, etc.) but at current there's a small thing bothering me. The rounds fired out of the mortar face the right direction initially, but as they arc they stay facing the same direction, when in reality they would be turning to face the ground (or at least that's how I'd like it)

I'm not too sure how to solve this; my first idea was to add an Attachable that weighed more to the head of the shell. It did nothing, predictably. The shells were TDExplosives, so I tried using MOSRotating instead; nada. I'm running fairly short on ideas.

Lua is a new and frightening thing to me. My old mods were made back when there was no Lua; back then we had to make our own code, using bits of twine and balsa wood. The codes we made back in those days, helped us defeat the Kaiser it did, back in 1857 when onions were the style of the time

Aaaanyway. I'm willing to learn a bit of Lua (or hack my way through any example code people provide) if it will help. Does anyone have any ideas? Cheers!

EDIT: Edited for spelling purposes.

Author:  Duh102 [ Fri Feb 05, 2010 7:21 pm ]
Post subject:  Re: Orientating Rounds?

You mean point in the direction it is traveling? OrientToVel = 1 will do that. Otherwise, I'm not sure what you mean.

Author:  Fat Zombie [ Fri Feb 05, 2010 8:15 pm ]
Post subject:  Re: Orientating Rounds?

Duh102 wrote:
You mean point in the direction it is traveling? OrientToVel = 1 will do that. Otherwise, I'm not sure what you mean.


Ah, so I just put that in the code? If it's that simple that I feel a right dunderhead. One minute.

EDIT: Yep, that works! Fantastic.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/