Gun Turrent for Vehicles?
|
|
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
|
02-02-2005 14:40
Is there a way to have user controlled gun turrents on a vehicle?
like a gun turrent on the under side of an aircraft so your Passanger/Gunner can shoot while you fly... And if able mouse point controllable?
_____________________
Drunken Monkeys danceing on the tables. Falling from the sky just like in a fable.
|
|
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
|
02-02-2005 15:38
yes
If you make the gun turret 1 prim (cut), you can use llSetLocalRot() to set the correct rotation. This rotation should also be give to the bullet rezzing script in the llRezObject.
Either use the control event and keys to control rotation, but i can imagine this conflicts with controlling the plane...
A second way:
Make an attachment that attaches to the head of the avie. Let it send info on it's rotation to the turret. You can now control the turret by looking at places in mousemove. Vehicle control can still be done by the keyboard.
|
|
Jim Bunderfeld
The Coder
Join date: 1 Mar 2004
Posts: 161
|
02-02-2005 17:57
sure, study some of the gun scripts and you should be able to figure it out 
|
|
Toneless Tomba
(Insert Witty Title Here)
Join date: 13 Oct 2004
Posts: 241
|
02-03-2005 09:52
Some people have discussed this before maybe this will help: /54/3b/19252/1.html
|
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
02-03-2005 10:03
There is neither an N in the word "turret", nor is there an "en" sound. It is pronounced "turr-et", it is spelled "turret".
_____________________
</sarcasm>
|
|
Toneless Tomba
(Insert Witty Title Here)
Join date: 13 Oct 2004
Posts: 241
|
02-03-2005 10:16
Don't forget you only get 31 prims for a vehicle. You may want to approach it by attaching the turret to yourself. Probally be easier to script too because you are basically attaching/wearing a gun while sitting down it a vehicle. Not the most prettiest, but it should work.
|
|
Kayin Zugzwang
A Superior Grouch
Join date: 7 Jun 2004
Posts: 269
|
02-03-2005 11:19
Theres two ways to go about this though they're probably kind of scary! I've done it though.
My current turret system works by having a child prim rotate to the way a gunner is looking... its hard to shoot like this, but its more sporting and less buggy
|
|
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
|
02-03-2005 17:34
O trust me we have surpassed the prim limit for this vehicle long ago... this is to be part of a supership
Sarcazem/Thanks for the spell check./Sarcazem
I will check that link out and will also try a few other options that have arose to my attention
_____________________
Drunken Monkeys danceing on the tables. Falling from the sky just like in a fable.
|
|
Rhombur Volos
King of Scripture & Kebab
Join date: 6 Oct 2004
Posts: 102
|
02-04-2005 09:11
From: Toneless Tomba Don't forget you only get 31 prims for a vehicle. You may want to approach it by attaching the turret to yourself. Probally be easier to script too because you are basically attaching/wearing a gun while sitting down it a vehicle. Not the most prettiest, but it should work. That won't work. Attachments can neither move nor rotate while attached. TXGorilla: i have made a rotating turret for a ship i'm making in cooperation with Dano Plisskin. All you need to do is calculate local position, convert rotation from local to global, apply it with llSetPrimitiveParams, and it will do as you please.
|
|
Ursula Madison
Chewbacca is my co-pilot
Join date: 31 Jul 2004
Posts: 713
|
02-04-2005 11:23
From: Rhombur Volos That won't work. Attachments can neither move nor rotate while attached. It will work. Sure, attachments don't move in relation to the attach point, but by the very fact that they're attached to your av, they will move/rotate as your av does in mouselook. The only difference from a regular scripted gun and an attached turret is in appearance, and the fact that if you exit the vehicle, the turret will go with you (which will look really silly)... But as Toneless already said, its not the prettiest solution.
_____________________
"Huh... did everything just taste purple for a second?" -- Philip J. Fry
|
|
Toneless Tomba
(Insert Witty Title Here)
Join date: 13 Oct 2004
Posts: 241
|
02-04-2005 16:56
From: Rhombur Volos That won't work. Attachments can neither move nor rotate while attached.
Yeah it's not pretty. Anyways I thought it was easy way out plus this was before I knew he went over the 31 prim limit. There are some limitations though it will not go 360 degrees around if you are sitting down. Just attach it to your head, like your chin or nose it will move around where you look.
|