[?] Adding arcade crosshairs

Making or wanting help making your own asset? Check in here
Post Reply
User avatar
Senshi
PR:BF2 Developer
Posts: 358
Joined: 2010-04-29 10:44

[?] Adding arcade crosshairs

Post by Senshi »

I want to reinsert crosshairs for debug/testing purposes for some weapons in my personal submod. How to best go at this? I don't care how they look, I just want some visual representation of the current deviations, so even vanilla optics would be quite okay for this.
Doc.Pock
Posts: 2899
Joined: 2010-08-23 14:53

Re: [?]Adding arcade crosshairs

Post by Doc.Pock »

you could use the hat code
User avatar
Senshi
PR:BF2 Developer
Posts: 358
Joined: 2010-04-29 10:44

Re: [?]Adding arcade crosshairs

Post by Senshi »

Yeah I could, if it would work and I didn't mess up somewhere, obviously. I'm not quite sure what lines exactly are responsible for the HAT "crosshair".
There are various WeaponHUD settings, but the actual "crosshair" section seems to be not active for the HAT, just as for no other weapon. That confuses me a bit.
LyRiCs
Posts: 93
Joined: 2009-05-03 13:56

Post by LyRiCs »

place a red sticker on your screen *gg*
Doc.Pock
Posts: 2899
Joined: 2010-08-23 14:53

Re: [?]Adding arcade crosshairs

Post by Doc.Pock »

Code: Select all

ObjectTemplate.createComponent AbilityHud
ObjectTemplate.abilityHud.ammoSound S_Resupply
ObjectTemplate.abilityHud.healingSound S_Heal
ObjectTemplate.abilityHud.repairingSound S_Repair

ObjectTemplate.createComponent VehicleHud
ObjectTemplate.vehicleHud.hudName 			"HUD_TEXT_MENU_SPAWN_KIT_AT_GB"
ObjectTemplate.vehicleHud.miniMapIcon		"Ingame\Kits\Icons\kit_ATAA_outline.tga"
ObjectTemplate.vehicleHud.vehicleIcon		"Ingame\Kits\Icons\kit_ATAA.tga"
ObjectTemplate.vehicleHud.spottedIcon 		"Ingame\GeneralIcons\empty.tga"
ObjectTemplate.vehicleHud.pantingSound		S_SprintBreath
ObjectTemplate.vehicleHud.injurySound		S_Injury
ObjectTemplate.vehicleHud.vehicleType 		7
its either in here...
or maybe tr.exe handles it
i know it handles hud somehow
User avatar
Senshi
PR:BF2 Developer
Posts: 358
Joined: 2010-04-29 10:44

Re: [?]Adding arcade crosshairs

Post by Senshi »

tr.exe probably only is responsible for thermal view stuff, combined with some python. Thermals are the only thing completely unreachable in the regular code, I assume.

Found the HAT code, it's in menu\HUD\HudSetup\Weapons\HudElementsPredator.con.

I'm still confused, because I added the very same GUI code ( 58 ) to some handweapons without them having any change at all. Odd. Will try to add the crosshair directly to the GUI elements.

EDIT: Got it to work now. Was a mixup in using the zips over the unzipped files. I was used to working&testing with unpacked file directly, which somehow doesn't seem to work anymore. Zipped the changed files and everything works as intended now.
Last edited by Senshi on 2012-03-04 09:27, edited 1 time in total.
Post Reply

Return to “PR:BF2 Community Modding”