Forum Discussion
9 years ago
The GFX language seems an awful lot like C++
I found this in trait.IsValidForDisplay:
I think this might be applicable:
http://en.cppreference.com/w/cpp/language/switch
...as for saving the file, I made that OCCULT_SORCERER addition and reloaded it several times. It seems to be holding.
One huge difference between the GFX files and the examples in the documentation is that I don't think TS4 gfx files use the std namespace. But the principle is the same.
I just noticed that the GFX says "edit actionscript" meaning that's the language. But the code above was not modified before it was pasted, which confirms that sort of thing does work.
I found this in trait.IsValidForDisplay:
protected function IsValidForDisplay(param1:SimTraitsInfo) : Boolean
{
switch(param1.TraitType)
{
case SimTraitsInfo.TRAIT_PERSONALITY:
case SimTraitsInfo.TRAIT_GAMEPLAY:
case SimTraitsInfo.TRAIT_GHOST:
case SimTraitsInfo.TRAIT_ASPIRATION:
case SimTraitsInfo.TRAIT_PHASE:
return true;
default:
return false;
}
}
I think this might be applicable:
http://en.cppreference.com/w/cpp/language/switch
...as for saving the file, I made that OCCULT_SORCERER addition and reloaded it several times. It seems to be holding.
One huge difference between the GFX files and the examples in the documentation is that I don't think TS4 gfx files use the std namespace. But the principle is the same.
I just noticed that the GFX says "edit actionscript" meaning that's the language. But the code above was not modified before it was pasted, which confirms that sort of thing does work.