Tell me why this script is not firing?
Zephirius
Member Posts: 419
Just want to do an evil check on the PC when he uses the altar...
I get nothing with this, not sure what's going on?
string sSound; void main() { object oPC = GetLastUsedBy(); if (GetIsPC(oPC)) { return; } int nGetAlign = GetAlignmentGoodEvil(oPC); if (nGetAlign == ALIGNMENT_EVIL) { effect eUnholy = EffectVisualEffect(VFX_FNF_LOS_EVIL_10); ApplyEffectToObject(DURATION_TYPE_INSTANT, eUnholy, oPC); effect eVFX = EffectVisualEffect(VFX_IMP_HEAD_EVIL); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC); sSound = "gui_learnspell"; AssignCommand(oPC, PlaySound(sSound)); AssignCommand(oPC, ActionSpeakString("You are not penitent!")); ActionLockObject(OBJECT_SELF); } else { effect eHoly = EffectVisualEffect(VFX_IMP_HOLY_AID); ApplyEffectToObject(DURATION_TYPE_INSTANT, eHoly, oPC); } }
I get nothing with this, not sure what's going on?
0
Comments
You want:
or
Now I just can't figure out why the altar wont unlock?
... it's in the else part of the script where I can't get it to unlock?
I threw in a bunch of commands that are probable useless, but I'm trying anything... Lol
Relying on oPC to actually do the unlocking is quite probably the reason why it fails to unlock because ActionUnlockObject() and ActionLockObject() represents the oPC's use of the 'Open Locks' skill which they may have too few points in. In this case I'm suggesting you try the SetLocked() function instead.
TR
TR