TangerineDog Posted February 20, 2018 Share Posted February 20, 2018 Is there something wrong with this script? Scriptname ShrinePerkMarkerScript extends ObjectReferenceSpell Property ShrineSpell AutoEvent OnGetUp(ObjectReference akFurniture)Game.GetPlayer().RemoveSpell(ShrineSpell)EndEvent Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 20, 2018 Share Posted February 20, 2018 Where is the script attached? If it is on an actor, I see no reason why it would not work unless the property was not filled. If it is on the chair or other object that the actor is getting up from, it will fail as it is not an event that such an object can run. OnGetUp is an event on the actor script. This means that only actors, aliases pointing to actors and possibly some magic effects applied to actors can run this event. Link to comment Share on other sites More sharing options...
TangerineDog Posted February 20, 2018 Author Share Posted February 20, 2018 It's attached to a Magic Effect that's attached to a Spell that's attached to a chair as the Associated Spell. The Spell and it's effect are visible in the Active Effects section. They just stay there once the player gets up. The Spell and the Effect are direct clones of the Well Rested Spell and Effect. Only the script has been changed. Link to comment Share on other sites More sharing options...
Evangela Posted February 20, 2018 Share Posted February 20, 2018 A chair ain't an actor. That script needs to go on an actor, preferably a ReferenceAlias if it's the player. Link to comment Share on other sites More sharing options...
TangerineDog Posted February 23, 2018 Author Share Posted February 23, 2018 A chair ain't an actor. That script needs to go on an actor, preferably a ReferenceAlias if it's the player.The effect isn't applied to the chair - the spell and thus the effect are applied to the player when he/ she sits down on the chair.Isn't that how the Associated Spell field works? The spell and effect show up correctly in the Actie Effects menu, too. Link to comment Share on other sites More sharing options...
foamyesque Posted February 24, 2018 Share Posted February 24, 2018 A chair ain't an actor. That script needs to go on an actor, preferably a ReferenceAlias if it's the player.The effect isn't applied to the chair - the spell and thus the effect are applied to the player when he/ she sits down on the chair.Isn't that how the Associated Spell field works? The spell and effect show up correctly in the Actie Effects menu, too. You need to be using 'extends activemagiceffect' if this is going on a magic effect. ActiveMagicEffects receive events from Actors they apply to, which should allow your OnGetUp() to work as intended. Link to comment Share on other sites More sharing options...
Recommended Posts