HUD positioning

Making or wanting help making your own asset? Check in here
Post Reply
czesiek77
Posts: 26
Joined: 2014-04-20 18:56

HUD positioning

Post 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?
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: HUD positioning

Post by Mats391 »

Im not understanding you 100%, could you post the code you are having trouble with?
czesiek77
Posts: 26
Joined: 2014-04-20 18:56

Re: HUD positioning

Post 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.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: HUD positioning

Post 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
czesiek77
Posts: 26
Joined: 2014-04-20 18:56

Re: HUD positioning

Post by czesiek77 »

Thank you agains Mister!
Post Reply

Return to “PR:BF2 Community Modding”