Stonemotmot Posted March 17, 2012 Share Posted March 17, 2012 Hello, I was wondering how to create a script that runs all the time or every time the game loads a new location. I know how to add scripts to objects but not how to attach them directly to the character or world in general. Link to comment Share on other sites More sharing options...
pawnxing Posted March 17, 2012 Share Posted March 17, 2012 I would also like an answer to this question. Are we limited to only adding scrips to refernces? Link to comment Share on other sites More sharing options...
tunaisafish Posted March 17, 2012 Share Posted March 17, 2012 That event is available with the Story Manager. OnStoryChangeLocaton() Basically you'd have a repeatable quest with a script something like this... Scriptname MyChangeLocScript extends Quest Event OnStoryChangeLocation(ObjectReference akActor, Location akOldLocation, Location akNewLocation) Debug.Trace(akActor + " moved from " + akOldLocation + " to " + akNewLocation) ;do stuff Stop() ; stop the quest so the SM will start us again on the next event. endEvent If you want to attach scripts to the player or any world object, then you can use the Story Manager and Alias's, or magic effect scripts. These will mean you won't have to edit the objects directly in the CK, so your mod will likely be more compatible with others. This thread on the Beth forums gives a good outline. Link to comment Share on other sites More sharing options...
Recommended Posts