Theweasels Posted May 23 Share Posted May 23 I was looking at ways to detect if the player or another actor gets within a certain distance of an activator. It seemed the best way to do with was with Trigger Boxes, but unfortunately the only documentation I can find on them talks about how to create them in a cell and link them to the activator. This won't work for me, as the activator is a duplicate of the base object created by the placeatme command and could exist anywhere. Is there a way to place a trigger box with papyrus as well, that can be linked to the the activator? Or is there some other way of having an event trigger when an actor is nearby? I don't want to run a script every few seconds to check, as there could be several of these activators and the performance impact is not worth it. The feature is pretty minor, so if there is no event-driven way to trigger it then I'll just have to cut it, but I wanted to see if anyone had ideas. Thank you. Link to comment Share on other sites More sharing options...
Sphered Posted May 23 Share Posted May 23 You can't set linked refs at runtime in Skyrim. You have to track placed refs a different way, and there are plenty of methods to do so. Property/variable up top is likely the most common route. Or an alias, etc Also... the Game script has a function called FindClosestActorFromRef() and ObjectReference script has OnTriggerEnter() which could be useful if you know who you are waiting for to trigger it Brief answers like this won't really answer your questions, but hopefully can be of some help Link to comment Share on other sites More sharing options...
dylbill Posted May 23 Share Posted May 23 A few things you might try is RegisterForLOS and OnGainLOS event. https://ck.uesp.net/wiki/OnGainLOS_-_Form There's also this mod Spawnable Trigger Boxes which might work for you. https://www.nexusmods.com/skyrim/mods/61245/ Link to comment Share on other sites More sharing options...
Theweasels Posted May 23 Author Share Posted May 23 It looks like the only viable option for my requirements is the Spawnable Trigger Boxes mod with the OnTriggerEnter() event. Might have to save this feature for a later update to the mod, that's a lot of work just to enable an activator when the player is within range. Thank you both for your quick responses. Link to comment Share on other sites More sharing options...
Recommended Posts