HELP: I want to check wether an Ability is an Officer Ability and the game breaks?
Posted: Thu Feb 09, 2017 11:23 pm
Hey everyone,
I'm about to release an UI-Mod for LW2 and encountered a strange issue. I loop through all earned soldier abilities and want to check whether a specific ability is an officer ability or not. As soon as I implement the following function, the officer part of LW2 broke! Officer icons are not displayed anymore in squadselect, GTS does no longer display two officer slots, i cant even access the one present correctly. I am really confused by this, since my code seems innocent enough? Maybe anyone has a pointer on what I do wrong
Screenshot of the broken GTS:
http://images.akamai.steamusercontent.c ... 9D71AFC53/
Funny thing is: Justz the function being there is enough to break everything, I dont even need to call it/use it.
I'm about to release an UI-Mod for LW2 and encountered a strange issue. I loop through all earned soldier abilities and want to check whether a specific ability is an officer ability or not. As soon as I implement the following function, the officer part of LW2 broke! Officer icons are not displayed anymore in squadselect, GTS does no longer display two officer slots, i cant even access the one present correctly. I am really confused by this, since my code seems innocent enough? Maybe anyone has a pointer on what I do wrong
Code: Select all
function bool isAnOfficerPerk(X2AbilityTemplate AbTemplate, out int AbilityRank)
{
local int i;
`LEBMSG("AbTemplate:" @ AbTemplate.Dataname);
for (i = 0; i < class'LWOfficerUtilities'.default.OfficerAbilityTree.length; ++i)
{
If(class'LWOfficerUtilities'.default.OfficerAbilityTree[i].AbilityName == AbTemplate.Dataname)
{
AbilityRank = class'LWOfficerUtilities'.default.OfficerAbilityTree[i].Rank;
return true;
}
}
AbilityRank = 0;
return false;
}
http://images.akamai.steamusercontent.c ... 9D71AFC53/
Funny thing is: Justz the function being there is enough to break everything, I dont even need to call it/use it.