» Wed May 15, 2013 6:50 pm
I've done that and I got it to work except the get detected part.
On the playeralias script I added messageboxes as a test to see when I entered sneak/not sneak and detected/not detected.
The sneaking part works fine, but I'm not getting the detected to fire. Here's the two effect scripts along with the player alias script:
Sneaking Effect Script:
Spoiler Scriptname CSisSneakingEffectScript extends ActiveMagicEffect {Condition Event - IsSneaking == 1}CSSneakAliasScript Property Detect Hidden CSSneakAliasScript function get() ;Make sure these match the quest and alias names return Quest.GetQuest("CSSneakDetectQuest").GetAliasByName("PlayerAlias") as CSSneakAliasScript endFunctionendPropertyEvent OnEffectStart(Actor akTarget, Actor akCaster) Detect.OnBeginSneak()EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) Detect.OnEndSneak()EndEvent
Detected Effect Script:
Spoiler Scriptname CSGetDetectedEffectScript extends ActiveMagicEffect {Condition Event - GetDetected == 1}CSSneakAliasScript Property Detect Hidden CSSneakAliasScript function get() ;Make sure these match the quest and alias names return Quest.GetQuest("CSSneakDetectQuest").GetAliasByName("PlayerAlias") as CSSneakAliasScript endFunctionendPropertyEvent OnEffectStart(Actor akTarget, Actor akCaster) Detect.OnStealthFound()EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) Detect.OnStealthLost()EndEvent
and the player alias script:
Spoiler Scriptname CSSneakAliasScript extends ReferenceAlias {Attached to players alias}Event OnBeginSneak() debug.messagebox("I'm sneaking now.") debug.trace("omg im sneaking")EndEventEvent OnEndSneak() debug.messagebox("I'm not sneaking.") debug.trace("lol im not sneaking")EndEventEvent OnStealthFound() debug.messagebox("I'm Detected!") debug.trace("im detected")EndEventEvent OnStealthLost() debug.messagebox("I'm Lost!") debug.trace("im lost")EndEvent
On the spell itself I have the two conditions checked as follows:
for IsSneaking effect - Target=S / Function Name = isSneaking / == 1
for getdetected effect - (I tried several combinations here, but can't seem to find one that works) as getdetected wants a specific target. so I tried having the target line as subject, with the function info as playerref == 1, I also tried target as PL, with the function info as playerref as well as leaving the function info blank. not sure what's going on but I can't seem to get the getdetected part to fire off when i'm detected or not.
Any help please? Thanks