Home   Help Search Login Register  

Author Topic: Vehicle Gun Alignment  (Read 2280 times)

0 Members and 1 Guest are viewing this topic.

Solarix

  • Guest
Vehicle Gun Alignment
« on: 29 Aug 2002, 08:52:11 »
Something I've been trying to figure out for quite some time is... how do you set the gun/cannon on tanks, jeeps w/ mgun, boats, helicopters, bmps, etc.. to be aligned at the start of the mission.  I've noticed they are in single player, but for some stupid reason in multiplayer they are always aimed the wrong direction.... ie tanks aimed backwards, helicopters aimed to left about 30-45 degrees... etc...

 ???

Having to get in as gunner to manually align the gun before going solo w/ manual fire is a pain in the ***.

« Last Edit: 31 Aug 2002, 10:00:22 by Col Solarix »

tai mai shu

  • Guest
Re:Vehicle Gun Alignment
« Reply #1 on: 30 Aug 2002, 08:29:31 »
yeah thats pretty weird.  maybe its so one person cant manually fire, it forcs him to take a gunner along (but tha again, you could just get in as gunner and turn the gun around : )

also, how come in some tanks (m60) in the gunsight, the aiming dot is often offset or not aiming straight.

killerkid

  • Guest
Re:Vehicle Gun Alignment
« Reply #2 on: 31 Aug 2002, 10:37:00 »
i think you need to make a script....
Quote
; ap moveingunner tank
; ap dowatch obj1
; ap action [str_action_getout]
; ap setpos [500,500,500,]
exit

Solarix

  • Guest
Re:Vehicle Gun Alignment
« Reply #3 on: 31 Aug 2002, 15:57:11 »
Nope, that's not what I'm looking for...

what it looks like your script is doing, is...

1. placing a unit "ap" as gunner in vehicle named "tank"
2. "ap" Watches "obj1", which would aim towards the object named "obj1".
3. unit "ap" gets out
4. unit "ap" gets moved to 500,500,500
5. script exits

That would involve making sure that "obj1" is directly in front of "tank" at a level angle of attack (and any other vehicles that need aligned), for it to even be fully accurate.  And it involves creating an useless soldier and object.

I just want to find a way to reset the gun, centered in front.

Maybe just deleting and recreating the vehicle would reset it?

ie:  in init field....
Code: [Select]
unitpos=getpos this; unitdir=getdir this; deletevehicle this; ("AH1" createvehicle unitpos) setpos unitpos; this setdir unitdir;

???
« Last Edit: 31 Aug 2002, 15:58:35 by Col Solarix »

tai mai shu

  • Guest
Re:Vehicle Gun Alignment
« Reply #4 on: 31 Aug 2002, 23:29:41 »
i notice that the tank guns are almost always offset when they respawn.  probly cuz the gunner had the gun around and got killed.

killerkid

  • Guest
Re:Vehicle Gun Alignment
« Reply #5 on: 01 Sep 2002, 02:59:11 »
You could always se game logic.  Thats an invisable teamless object.  Thats what i use to make my men look at things.  So if he looked at obj1, obj1 would be a game logic..


killerkid out

tai mai shu

  • Guest
Re:Vehicle Gun Alignment
« Reply #6 on: 01 Sep 2002, 05:42:37 »
you can make ai look at gamelogics? cool.  how about making em shoot at gamelogics?

killerkid

  • Guest
Re:Vehicle Gun Alignment
« Reply #7 on: 01 Sep 2002, 10:49:21 »
Well i don't know...  i think thats all they're used for....  You can try but i don't know the command to kill somthing... :P