if (sMaster==""){oMaster=(GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker());}
else{oMaster=GetTarget(sMaster);}
Here is the way I would like it expanded to help explain it to me. (i.e. This is my attempt to interpret, but I know it is wrong because it looks like there is more in there to do with OBJECT_SELF and another GetPCSpeaker.)
void main(string sTarget, int bForce, string sMaster, int bOverrideBehavior, int iForbidXP)
{
object oMaster;
if(sMaster == "")
{
oMaster=(GetPCSpeaker());
}
else
{
oMaster=GetTarget(sMaster);
}
}
Therefore, I ask if anybody could complete my expansion correctly. Thanks,
Lance
@Lance_Botelle I go into the Conditional Operator in a reasonable amount of detail in my TR’s Basics - Decicisions ebook. While written primarily for an NwN audience, almost all the information contained within it applies to NwN2 as well (AFAIK all the information on this operator applies to NwN2). So you might find it useful.