Quantcast
Channel: Project Reality Forums - PR:BF2 Community Modding
Viewing all articles
Browse latest Browse all 924

[Code] Flare bug work-around

$
0
0
Being tired of flarebug that still not fixed from darken ages, made some quick work-around to tweak&hud.

Currently we getting flarebugs due to 1 mag of 60 flares and maglinked weapons(flares and counter are seperate weapons), bf2 can't into logic :(
My idea was to create another system that won't suffer from 1 mag effect even in theory, so the most simply solution were to get 10 mags of 6 flares. Also HUD.

heli flares&counter component in .tweak file(applies to all helis)
\vehicles\air\cf_the_chinook\cf_the_chinook.tweak
Code:

rem ---BeginComp:DefaultAmmoComp ---
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.nrOfMags 10
ObjectTemplate.ammo.magSize 6
ObjectTemplate.ammo.reloadTime 0.01

ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.reloadWithoutPlayer 1
ObjectTemplate.ammo.magLinkWeapon cf_the_chinook_flare_group_the_counter
rem ---EndComp ---

hudelements for chinook
hud\hudsetup\vehicles\air\hudelementsuh60.con
Code:

rem -------------------------------------- Flares --------------------------------------

hudBuilder.createTextNode                        Uh60Hud Uh60FlaresText 254 420 40 10
hudBuilder.setTextNodeStyle                        Fonts/vehicleHudFont_6.dif 0
hudBuilder.setTextNodeString        "FLARES"
hudBuilder.setNodeColor                                0 1 0 1

hudBuilder.createTextNode                        Uh60Hud Uh60FlaresCount 285 420 40 10
hudBuilder.setTextNodeStyle                        Fonts/vehicleHudFont_6.dif 0
hudBuilder.setTextNodeStringVariable                PrimaryAmmoString
hudBuilder.setNodeColor                                0 1 0 1

hudBuilder.createTextNode                        Uh60Hud Uh60FlareMagsCount 315 420 40 10
hudBuilder.setTextNodeStyle                        Fonts/vehicleHudFont_6.dif 2
hudBuilder.setTextNodeStringVariable                PrimaryClipString
hudBuilder.setNodeColor                                0 1 0 1

Same can be applied to other jets&helis.

Here is an example how it works:
YouTube Video

Viewing all articles
Browse latest Browse all 924

Trending Articles