"if" Evil script help
Zephirius
Member Posts: 419
I'm trying to phrase a couple lines of code to determine whether the PC is evil. If he's evil then a certain set of instructions will ensue. I'm just trying to see if he's evil.
object oObject; void main() { object oPC = GetLastUsedBy(); if (!GetIsPC(oPC)) return; oObject = GetObjectByTag("CASTER"); GetAlignmentGoodEvil(oPC); //I'm hung up right here? ActionCastSpellAtObject(SPELL_AID, oPC, METAMAGIC_ANY, FALSE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE); }
0
Comments
if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
But yes - The Get simply returns an integer number, but you have to DO something with that number in order for it to be effective. You could either store that number (like `int nAlign = GetAlign....`) or use it directly in the comparison, as your follow-up as done.