Posted: 2008-02-11 12:52
Ok, since you asked, here's a piece of code that creates gunner bar in the pilot's seat.
If I just apply this code to CoPilot's seat, gunnerBar will be created but it won't update itself, probably because the GunnerAngle variable only updates when you are in the Pilot's seat.
But there is another variable, called VehicleTurretAngle. If I use it instead of GunnerAngle the gunnerBar works, but incorrectly. It shows reversed direction, for example when gunner is looking left the gunnerBar moves right. If I could only do something like this:
setCompassNodeValueVariable -VehicleTurretAngle
it would most likely solve the problem. But I can't use "-", "+" or any other operator or expression.
Btw speed indicator also doesn't update itself. Alt-meter works fine though.
Code: Select all
hudBuilder.createCompassNode Ah1zCoPilotHud Ah1zGunnerBarView 3 335 384 123 16 1 0
hudBuilder.setCompassNodeTexture 1 Ingame\Vehicles\Icons\Hud\Air\Attack\Ah1z\Ah1z_gunnerwiew.tga
hudBuilder.setCompassNodeTextureSize 128 16
hudBuilder.setCompassNodeBorder 0 0 0 22
hudBuilder.setCompassNodeValueVariable GunnerAngle
hudBuilder.setCompassNodeOffset -61But there is another variable, called VehicleTurretAngle. If I use it instead of GunnerAngle the gunnerBar works, but incorrectly. It shows reversed direction, for example when gunner is looking left the gunnerBar moves right. If I could only do something like this:
setCompassNodeValueVariable -VehicleTurretAngle
it would most likely solve the problem. But I can't use "-", "+" or any other operator or expression.
Btw speed indicator also doesn't update itself. Alt-meter works fine though.