Still not working... I have the DynamicLoad loading the class correctly and I can LOG it outside of the function that is doing the loading BUT, and this is a HUGE BUT, I can't access any of the variables. When I try to access them, it's compiling with an error, 'Unrecognized member <variable> in class Class.' So, I get that it means it can't see the variables in the class. They're there, I checked. I'm at a loss as to why I can do the DynamicLoad and log the Package.Class just fine but not see inside the Package.Class.
I'm going to strip the code I'm working out into another project so I can share it. This is a larger file that I'm working with that has a lot of stuff that is not impacted by this issue.
Since this is a working package, I'm working to implement this without breaking the working file so it isn't pretty and I'm re-learning the code. So, I apologize for this mess of what I have here:
Code: Select all
Class MutTest extends Mutator config(MyConfig);
var class ACEI;
function PreBeginPlay()
{
local Actor LogActor;
foreach AllActors(class'Actor',LogActor)
{
if ( instr(LogActor,"ACEInfo" ) > 0 )
LOG("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Actor:"$LogActor); //This logs the ACEInfo named classes that are spawned.
}
//There's a bunch of stuff around this...
LoadACEInfo("DeathMatchPlus"); //To hit the DEFAULT Switch in the LoadACEInfo function
LOG("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ACEI Variable:"$ACEI.bTrans); //With this here, it fails to compile. Without it, it compiles with no errors.
}
function LoadACEInfo( string sGame )
{
switch (sGame)
{
case "MonsterHunt":
LOG(" Loading MONSTERHUNT defaults ");
ACEI = class<Actor>(DynamicLoadObject( "TestMut.ACEInfoMH", class'Class'));
break;
Default:
LOG(" Loading DM/TDM Settings ");
ACEI = class<Actor>(DynamicLoadObject( "TestMut.ACEInfoDM", class'Class'));
}
LOG("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ACEI:"$ACEI); //This logs as TestMut.ACEInfoDM just fine.
}
Code: Select all
class InfoDM extends ACEInfo config(MyConfig);
//ACEInfo contains other variables for the base mutator that are not game class specific.
//InfoMH looks identical to this class
var config bool bTrans;
var config bool bChainsaw;
var config bool bShockRifle;
var config bool bBioRifle;
var config bool bPulseGun;
var config bool bRipper;
var config bool bMinigun2;
var config bool bEightball;
var config bool bFlakCannon;
var config bool bEnforcer;
var config bool bImpactHammer;
var config bool bWarhead;
var config bool bHealthpack;
var config bool bHealthVial;
var config bool bMedBox;
var config bool bArmor;
var config bool bThighpads;
var config bool bBoots;
var config bool bInvisi;
var config bool bBelt;
var config bool bUDamage;
defaultproperties
{
bTrans=False
bShockRifle=True
bChainsaw=True
bBioRifle=True
bPulseGun=True
bRipper=True
bMinigun2=True
bEightball=True
bFlakCannon=True
bEnforcer=True
bImpactHammer=True
bWarhead=True
bHealthpack=True
bHealthVial=True
bMedBox=True
bArmor=True
bThighpads=True
bBoots=True
bInvisi=True
bBelt=True
bUDamage=True
}