Page 1 of 1

HUD positioning

Posted: 2014-04-21 18:34
by czesiek77
Hi I have tried to make new HUD for AH1Z, to look more like like in Battlefield 3 (not exact copy, just similiar). So I ve started from making new horizon. I edited F15 horizon(it is used by Ah1Z), I resize to 256x500 from 256x8. I had to move it up becouse it was too low. And here is the problem. I can change X but I cant change Y. After changing Y nothing happens. Anyone help?

Re: HUD positioning

Posted: 2014-04-21 20:42
by Mats391
Im not understanding you 100%, could you post the code you are having trouble with?

Re: HUD positioning

Posted: 2014-04-21 22:28
by czesiek77
Code:

Code: Select all

hudBuilder.createPictureNode		Ah1zPilotHud Ah1zMissileHorizon 272 172 256 8
hudBuilder.setPictureNodeTexture 	Ingame\Vehicles\Icons\Hud\Air\Attack\F15\Navigation\horizon.tga
hudBuilder.setNodeColor		 	0 0.8 0 1
hudBuilder.setNodePosVariable		1 AngleOfAttack
hudBuilder.setPictureNodeRotateVariable VehicleBanking
hudBuilder.setPictureNodeCenterPoint 	0 0
I am talking about numbers 272(X) and 172(Y) which stants for positioning HUD picture in game. When I change 172 to any other number nothing changes.

Re: HUD positioning

Posted: 2014-04-22 10:12
by Mats391
That is because you have "hudBuilder.setNodePosVariable 1 AngleOfAttack". This is needed for the horizon to move on the Y axis. You can change its position by using "hudBuilder.setNodeOffset X Y".
For reference you could check the Tiger pilot hud (menu/HUD/HudSetup/Vehicles/Air/HudElementsTigerUHPilot.con)

Code: Select all

hudBuilder.createPictureNode			TigerUHTPilotHud TigerUHTHorizonAngleOfAttack 368 236 64 128
hudBuilder.setPictureNodeTexture 		Ingame\Vehicles\Icons\Hud\Air\Attack\tiger\tiger_horizon2.tga
hudBuilder.setNodeColor		 		0 1 0 1
hudBuilder.setNodePosVariable			1 AngleOfAttack
hudBuilder.setPictureNodeRotateVariable 	VehicleBanking
hudBuilder.setPictureNodeCenterPoint 		0 0
hudBuilder.setNodeOffset			0 -64

Re: HUD positioning

Posted: 2014-04-22 11:20
by czesiek77
Thank you agains Mister!