Relevant Halo Posted December 2, 2024 Posted December 2, 2024 (edited) Hi, could someone suggest reasons why the actor isn't being tracked? isActorTracked always returns false when run. Running 1.5.97 Sexlab framework v163 and Sexlab Framework PPLUS 2.12.0 ScriptName foo extends activemagiceffect SexLabFramework Property SexLab auto Actor selfRef String cb Event OnEffectStart(Actor Target, Actor Caster) selfRef = caster name = getName() cb = name + "_cb" SexLab.TrackActor(selfRef, cb) EndEvent Event OnHit(...) debug.Notification("isTracked: " + SexLab.IsActorTracked(selfRef)) EndEvent Edited December 2, 2024 by Relevant Halo
Tlam99 Posted December 2, 2024 Posted December 2, 2024 (edited) name = getname() ;from what ? name = selfRef.getname() Maybe formcast needed , as actor Edited December 2, 2024 by Tlam99
Relevant Halo Posted December 2, 2024 Author Posted December 2, 2024 getName() is fine and outputs the expected string.
Relevant Halo Posted December 2, 2024 Author Posted December 2, 2024 narrowed down the cause to sexlab pplus. Works fine without it.
Tlam99 Posted December 2, 2024 Posted December 2, 2024 41 minutes ago, Relevant Halo said: getName() read this https://ck.uesp.net/w/index.php?title=GetName_-_Alias&mobileaction=toggle_view_desktop
traison Posted December 2, 2024 Posted December 2, 2024 The reason why GetName works like that is because some (or all?) functions and events from the Actor the ActiveMagicEffect is attached to are available within the MGEF script itself. See the 2nd paragraph at the top here. Since Actor inherits from Form, the GetName function being called here is the one in Form.GetName, not Alias.GetName. Alias does not inherit from Form. Now what happens if you cast this spell on a door for instance, that I do not know. I would assume that does not create an instance of the MGEF script, but I've never tested it. I've had soultrapped doors and such before. One location where it happens practically every time is the quest where you get throw into Azura's Star. Nelacar always hits the star itself trying to soultrap me, making it glow and emit weird noises. Could also be a gimmic/bug of the soul trap archetype.
Tlam99 Posted December 2, 2024 Posted December 2, 2024 (edited) 36 minutes ago, traison said: MGEF script Thats the point. Inherited. It's defined like coincidently. I prefer the definition by assigning the alias via reference to avoid a not defined reference which is prone to cause issues, even ctd. Because references of MGEF will not be inherited if effect ends and it cannot be tested if the effect is active. Example Player and npc (followers) are handled completely different on cell change. Player keeps the effects, npc appear like resurrect and the effects will be reapplied. (ever wondered why naked followers appear dressed up on cell chage ?) If now a follower has the MGEF xxx without clear defined reference, the effect will not be reapplied. This appearance of followers on cell change will even fire the onequip() event. (useful for some scripts) But the MGEF without clear reference is quit dangerous for saves (load saved game). Edited December 2, 2024 by Tlam99
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now