Home   Help Search Login Register  

Author Topic: Azimuth  (Read 1064 times)

0 Members and 1 Guest are viewing this topic.

jamie_psx

  • Guest
Azimuth
« on: 12 Sep 2002, 03:57:25 »
Hi guys I'm new to the forum and I have an editing question:

Does anyone know how to get the direction that a tank gunner is facing once he's at his station?

I tried:

GetDir (Gunner tank_name)

and

GetDir Player

but it gives me an invalid FFFFFEF hexadecimal value, instead of a 0-360degree value.

Alternatively, can you get this direction by finding which way the tank's gun is pointing?

I know that OFP-engine knows because any change in the guns or gunner's direction is reflected in the gunner's compass.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Azimuth
« Reply #1 on: 12 Sep 2002, 12:01:03 »
Welcome to the forums!     I don't know the answer to this.  But I do know that the name of the gunner:    if the tank is called tank1 the gunner is automatically called tank1G.  Similarly the driver and commander are tank1D and tank1C.    So I would have thought that

GetDir tank1G

would have worked.

Tried a quick test.   (No, I don't have anything better to do.)  Created a tank called you've guessed it tank 1.    Created a trigger and put this in the condition line

(getdir tank1G) == (getdir tank1C)

and the trigger fired as soon as I previewed the mission.   Obviously the gunner and commander are always facing the same way at the start of a mission.  

Hope that helps you do whatever you're trying to do.
Plenty of reviewed ArmA missions for you to play

jamie_psx

  • Guest
Re:Azimuth
« Reply #2 on: 13 Sep 2002, 04:46:42 »
Thanks, I'll give it a shot.

T.S.C.Plage

  • Guest
Re:Azimuth
« Reply #3 on: 13 Sep 2002, 06:30:40 »
If I want a turned turret I insert a object (named) on the map in the direction where the gunner should aim at.

Then add to the gunners initline (if you've a empty tank and three crewmembers) or write it into a script.

gunner1 KnowsAbout object1
gunner1 doTarget object1

This should work...maybe you've to loop it in a script if there's some action around the gunner is interrested in.

I haven't tried the tank1G setdir ... thing but sounds quite good!


Greetz
Plage
« Last Edit: 13 Sep 2002, 06:31:11 by T.S.C.Plage »