Jump to content

help executing a simple script upon discovering a map marker


Recommended Posts

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...