adb3nj Posted 3 hours ago Share Posted 3 hours ago I'm trying to create a mod the reliably detects changes in the weather. My approach has been to add a Spell to the player that triggers various Magic Effects based on weather conditions – if the first set of conditions is satisfied, Effect 1 is triggered; the second set of conditions, Effect 2 is triggered; etc. That bit works fine, but I'm having trouble getting workshop object to detect it remotely. I've tried two methods: Event OnLoad() RegisterForCustomEvent(kTest, "TestEvent") EndEvent Event TestScript.TestEvent(TestScript akSender, Var[] akArgs) Debug.Notification("Custom event received.") EndEvent And: Event OnLoad() RegisterForMagicEffectApplyEvent(PlayerRef, PlayerRef, DetectWeatherEffect, true) EndEvent Event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect) Debug.Notification("Magic effect applied.") RegisterForMagicEffectApplyEvent(PlayerRef, PlayerRef, DetectWeatherEffect, true) EndEvent Weirdly, the second approach did briefly work, but then I managed to break it while building on it and I have no idea how. Any ideas? Is it because they're workshop objects? I'm sure I've used remote events on workshop objects before… The only alternative method I can think of is creating a collection of reference aliases and cycling through it, but that seems like a bit of a sledgehammer to crack a nut. Edit: The base form that I'm trying to register with is an activator, if that makes any difference. Link to comment Share on other sites More sharing options...
Recommended Posts