Errors with Heavy Weapon Reload Script
Posted: Sun Jun 25, 2017 7:46 am
Hi all, for those of you more experienced with .uc files, I need help working around an error.
The full script is here: https://pastebin.com/3mw7gRjG
The error is specifically here:
I'm trying to simulate the number of stages of reload using charges. I'm setting the initial charges on the reload to the number of charges in the config determined by the function in the class X2ReloadStages named GetFlameThrowerReloadStages.
The intended behavior is once the number of charges hits 0 upon an activation, the charges should refresh back to its previous state, and then reload a single charge into the intended heavy weapon.
This is what that function looks like right now:
The error/warning log currently shows:
The last warning is presumably because I override Gauntlet by creating a second Gauntlet class. Any help would be appreciated, thanks.
The full script is here: https://pastebin.com/3mw7gRjG
The error is specifically here:
Code: Select all
Charges = new class'X2AbilityCharges_BonusCharges';
Charges.InitialCharges = class'X2ReloadStages'.GetFlamethrowerReloadStages(AffectState);
Template.AbilityCharges = Charge
The intended behavior is once the number of charges hits 0 upon an activation, the charges should refresh back to its previous state, and then reload a single charge into the intended heavy weapon.
This is what that function looks like right now:
Code: Select all
simulated function int GetFlamethrowerReloadStages(XComGameState_BaseObject AffectState)
{
if (XComGameState_Unit(AffectState).HasSoldierAbility('AutoloaderArmaments'))
{
return default.FLAMETHROWER_RELOAD_STAGES - default.AUTOLOADER_ARMAMENTS_BONUS;
}
return default.FLAMETHROWER_RELOAD_STAGES;
}
Code: Select all
C:\Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\Development\Src\TechnicalHeavyWeaponReload\Classes\X2Ability_LW_TechnicalHeavyWeaponReload.uc(46) : Error, Unrecognized member 'GetFlamethrowerReloadStages' in class 'Class'
C:\Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\binaries\..\Development\Src\TechnicalHeavyWeaponReload\Classes\..\..\XComGame\Mods\TechnicalHeavyWeaponReload\X2Item_LWGauntlet.uc : Warning, Duplicate class name: X2Item_LWGauntlet also exists in package LW_Overhaul