CuL8Rgator Posted October 16, 2019 Share Posted October 16, 2019 Anyone know of where I might find some info about quest added map markers? I'm working on a mod that adds a map. I'd like for that map to reveal certain map-markers once it is picked up (or on equip it covers the screen). Possibly I'd like it to have to be equipped to have the undiscovered locations shown. I've scoured the web and am coming up empty handed. Thanks for any info, in advance!Sorry if I seem all over with the idea, but I have already the map resource and texture I want to use, and I'm just having trouble with a good way to implement it. Thanks Link to comment Share on other sites More sharing options...
ReDragon2013 Posted October 16, 2019 Share Posted October 16, 2019 (edited) creationkit wiki tells you the basics:https://www.creationkit.com/index.php?title=Map_Marker by using scripts, you need at least this:https://www.creationkit.com/index.php?title=AddToMap_-_ObjectReference a sample script as follow, maybe it works for you: Scriptname xyzTestMapMarkerScript extends ObjectReference ; attach this script on the item you have created to switch map markers ObjectReference PROPERTY myMarker auto ; this is the map marker you want to switch ; -- EVENTs -- EVENT OnInit() Debug.Trace("OnInit() - has been reached for.. " +self) ; for debugging only ENDEVENT EVENT OnEquipped(Actor akActor) IF (akActor == Game.GetPlayer()) ELSE RETURN ; - STOP - not equipped by player ENDIF IF ( myMarker ) myMarker.AddToMap() ; fast travel not available ;;; myMarker.AddToMap(TRUE) ; fast travel is immediately possible ENDIF ENDEVENTsee also defaultAddMapMarkerOnCloseBookNotAlias Scriptname defaultAddMapMarkerOnCloseBookNotAlias extends ObjectReference {v1.4 ReDragon 2014} ; player closes a book, add the indicated map marker(s) ; optionally with fast travel enabled ObjectReference PROPERTY MapMarker1 auto ObjectReference PROPERTY MapMarker2 auto ObjectReference PROPERTY MapMarker3 auto ObjectReference PROPERTY MapMarker4 auto ObjectReference PROPERTY MapMarker5 auto Bool PROPERTY AllowFastTravel auto ; Allow fast travel to these markers? [Default=False] ; -- FUNCTIONs -- 2 FUNCTION myF_ADD(ObjectReference oRef) ;------------------------------------- IF oRef.IsMapMarkerVisible() RETURN ; - STOP - marker already known ### USKP 2.0.0 ### only, if you didn't know of location ENDIF ;--------------------- oRef.AddToMap(AllowFastTravel) ENDFUNCTION FUNCTION stageHandling() ;----------------------- IF ( MapMarker1 ) myF_ADD(MapMarker1) ENDIF IF ( MapMarker2 ) myF_ADD(MapMarker2) ENDIF IF ( MapMarker3 ) myF_ADD(MapMarker3) ENDIF IF ( MapMarker4 ) myF_ADD(MapMarker4) ENDIF IF ( MapMarker5 ) myF_ADD(MapMarker5) ENDIF ENDFUNCTION ; -- EVENTs -- ;=========================================== auto STATE ready ;=============== EVENT OnActivate(ObjectReference actionRef) stageHandling() ENDEVENT EVENT OnEquipped(Actor akActor) stageHandling() ENDEVENT ;======= endState ;=========================================== STATE Done ;========= endState Edited October 16, 2019 by ReDragon2013 Link to comment Share on other sites More sharing options...
Recommended Posts