I've got one script that needs to get the default NiceNames of these classes, without referring to any particular instance of any of them.
Here is what I have tried:
Code: Select all
// Expected output: type "summon nna" in console, get "nice name" when it appears
// Actual: fail to compile: "Unknown identifier 'nicename'"
class nicenameactor:inventory
{
string nicename;
property nicename:nicename;
default
{
nicenameactor.nicename "nice name";
}
}
class nna:actor
{
states
{
spawn:
TNT1 A 1 nodelay
{
for(int i=0;i<allactorclasses.size();i++)
{
if(allactorclasses[i] is "nicenameactor")
{
string nn=getdefaultbytype(allactorclasses[i]).nicename;
A_Log(nn);
}
}
}
stop;
}
}
Is there any other way to get the default class properties where the class is reference by a variable?
