Jump to content
ℹ️ Intermittent Download History issues ×

Attaching a script to the static: MapMarker


grey79

Recommended Posts

Can something like that be done in any way?

 

I'd need the script to be inherited on to every MapMarker reference.

I cant search/replace every MapMarker with an equivalent MapMarkerActivator - that breaks the map icons on the world map.

 

Ideas?

Link to comment
Share on other sites

Yeah... I have no idea why you would want to do this? I suppose if you only needed them scripted within the vicinity you could have a quest controller to dynamically create new markers that DO have scripts by finding the nearest marker, copying its attributes, disabling the old one, then enabling the new one.
Link to comment
Share on other sites

I want to change how the fast travel system works.

I wish every mapmarker to be disabled after a desired period of the player not visiting that location.

 

You can attach scripts to certain base objects. So I don't see why they would limit Statics in that way.

Link to comment
Share on other sites

I don't think you could do it on the fly via the base object, you would have to reference every travel marker available in your primary script... (There actually aren't really that many) just your script wouldn't be compatible with any mod that added more fast travel locations.

 

I'm not sure what type of object a mapmarker is or if it can even be found via "FindClosestReferenceOfType" but you could have the mod start out with them all default, and have it build up a list of map markers dynamically. You can dynamically create a FormList of all the closest mapmarkers (unique only) each time you load in. You don't need the markers themselves to have the script, but you can have a quest controller control the objects in the list.

Edited by expired6978
Link to comment
Share on other sites

I don't think you could do it on the fly via the base object, you would have to reference every travel marker available in your primary script... (There actually aren't really that many) just your script wouldn't be compatible with any mod that added more fast travel locations.

 

I'm not sure what type of object a mapmarker is or if it can even be found via "FindClosestReferenceOfType" but you could have the mod start out with them all default, and have it build up a list of map markers dynamically. You can dynamically create a FormList of all the closest mapmarkers (unique only) each time you load in. You don't need the markers themselves to have the script, but you can have a quest controller control the objects in the list.

 

I dont think there is an elegant way of doing things.

There aren't any good events to listen for either. OnCellAttach and OnCellLoad would trigger way before you reached the mapmarker (a mapmarker is a static as I wrote earlier).

So even if FindClosestReferenceOfType were to work, it wouldn't be very synergetic with the above events.

 

I'm officially giving up. I've spent waaay too long pondering this, and as a programmer of profession I'm pretty annoyed by the myriad of limitations set by CK, and Papyrus as a "language".

I only needed one sodding event to do this: OnDiscoveredLocation(ObjectReference aoLocation)... but alas it doesn't exist.

 

I MAY give it a shot with SKSE later, if that is possible.

 

Anyway, thanks for the suggestion, expired!

Edited by grey79
Link to comment
Share on other sites

  • Recently Browsing   0 members

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