Transient3292 Posted June 18, 2020 Share Posted June 18, 2020 I know nothing about scripting but have an idea for my mod that I'm hoping I can get some direction on executing. I would like to execute the "killallhostile" command upon the player discovering my map marker. I know my way around the CK decently enough but haven't done much with scripts at all. It seems like it could be done but I don't really know where to start. Any guidance at all would be greatly appreciated and I would be more than happy to credit anyone that can point me in a direction. Link to comment Share on other sites More sharing options...
SKKmods Posted June 18, 2020 Share Posted June 18, 2020 Unfortunately there is no script event associated with map marker discovery. What you could do is attach a script to the Xmarker destination that the map marker is associated with and use the OnLoad() event. There is no simple KAH script command. The script would need to Find them and Kill them. The method to find them depends on any common attributes they have: Keywords or LocationRefType are most common, but stuff like ActorBase, Race or Faction can be used. Link to comment Share on other sites More sharing options...
Transient3292 Posted June 18, 2020 Author Share Posted June 18, 2020 Damn,OK. They are a unique faction so specifying them shouldn't be an issue. Would setting foot into a specific cell be a qualifying event for the script? I've made a settlement and interior at Easy City Downs and my main goal is to keep the robots racing. Disabling the main boss causes the race to never begin so my workaround is to execute KAH when discovering the location. I'm still poking around and trying to learn what all is intertwined with this location. Link to comment Share on other sites More sharing options...
Zorkaz Posted June 18, 2020 Share Posted June 18, 2020 Just use a defaultemptytrigger and apply a script to it. Then use objectreference properties and link the robots with them Eg. "Robot1.setdead()" Link to comment Share on other sites More sharing options...
SKKmods Posted June 18, 2020 Share Posted June 18, 2020 Would setting foot into a specific cell be a qualifying event for the script? The OnLoad event triggers when the object loads 3D within the (default 5 uGridsToLoad) 10,240 game units radius around the player. If this is limited to specific existing placed actors then as Zorkaz suggests just set LinkedReferences to an object that generates the OnLoad event and kill them via GetRefsLinkedToMe. Link to comment Share on other sites More sharing options...
Transient3292 Posted June 20, 2020 Author Share Posted June 20, 2020 Thanks,I appreciate you guys explaining this to me. Now that I know what I need to do I can find some tutorials regarding how I can make the script. Link to comment Share on other sites More sharing options...
Recommended Posts