|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Author |
Message |
Point.blank
Joined: Sat May 02, 2009 4:52 am Posts: 254
|
Attachable Guns
The question I have is, how do you attach a gun to an actor (the head, to be exact), and wire it to fire when you press a key via Lua? I think you have to make the emitter and attach it to the body part in question, but I'm stuck at the Lua bit, because I can't script for beans. Any help will be appreciated.
|
Sat Dec 05, 2009 4:24 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Attachable Guns
The easiest way to attach something with lua is to not attach it at all. Some basic trigonometry can update the position relative to the head's rotation angle, and you can much more easily have an emitter fire when it's an unparented lua-created object.
|
Sat Dec 05, 2009 6:00 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Attachable Guns
I think it's because when it's not attached you can just look for it in the tables of particles, whereas when it is you have to cycle through MOs to find it, which is apparently a bit more complicated.
|
Mon Dec 07, 2009 7:27 am |
|
|
Jon
Joined: Thu Aug 06, 2009 8:34 pm Posts: 143
|
Re: Attachable Guns
You have to make an MOSRotating and create and update its position in lua. That way you can also aim.
|
Thu Dec 10, 2009 1:51 pm |
|
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|