Can map markers on the world map be dynamically moved around

Post » Tue Jun 19, 2012 4:42 pm

I made a basic mark spell/ recall spell/ and teleport home spell, which uses the same script and does work.
What i'd like to do those is have the mark put a mapmarker down on the world and have that updated (moved)
when a new mark spell is cast.

I know in Fallout3 and NV it was simply a matter of moving the map marker to the player, then enabling it.
To move, once a player marks the area, the mapmarker would then disable, get moved to the player again, and re-enable.

In skyrim, i can't seem to get that part to work. Here's the script.

Spoiler
Scriptname CSTeleportHomeScript extends ActiveMagicEffect  {Teleport Home / Mark / Recall Script}ObjectReference Property rHomeMarker  Auto  {Marker used at the Home Destination - Does NOT move}ObjectReference Property rStoredMarker  Auto  {Marker used to mark a teleport destination - moves to players location when casting mark}ObjectReference Property rMarkSpellMarker  Auto  {Map Marker used to show the location on the world map}ObjectReference PlayerInt Property iState = 1 Auto  Int Property iSubState = 0 Auto  {State used to determin which part of the script to use: Properties are localized to a specific spell: 1 - Home Spell, 2 - Mark Spell, 3 - Recall Spell}Event OnEffectStart(Actor Target, Actor Caster)	Player = Game.Getplayer()	if iState == 1								;Used by the Teleport Home Spell		if iSubstate == 0			Player.moveto (rHomeMarker)			iSubState = 1			endif	elseif iState == 2							;Used by the Mark Spell		if iSubstate == 0			rMarkSpellMarker.Disable ()			rStoredMarker.MoveTo (Player)	   ;This WORKS			rMarkSpellMarker.MoveTo (Player)				rMarkSpellMarker.Enable ()			rMarkSpellmarker.Addtomap ()		 ;If this does work, it's not updating or showing on the world map.			iSubstate = 1		endif	elseif iState == 3							;Recall Spell		if iSubState == 0			Player.MoveTo (rStoredMarker)			iSubState = 1		endif	endif	EndEventEvent OnEffectEnd(Actor Target, Actor Caster)		iSubState = 0EndEvent

Any help would be greatly appreciated.
Thanks,

-Mush-
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

Post » Wed Jun 20, 2012 5:03 am

mapmarker are STATIC and cant be moved...
I know this svcks...

worst part is that access to mapmarker options seems to be hard coded, so its not even possible to create a fake movable one :/
and the addtomap function only work with the original mapmarker formID
User avatar
Kaylee Campbell
 
Posts: 3463
Joined: Mon Mar 05, 2007 11:17 am

Post » Tue Jun 19, 2012 3:57 pm

mapmarker are STATIC and cant be moved...
I know this svcks... snip

The thing is, the other static markers, like MapMarkerHeading or xmarkers etc, they move fine. I'm able to use them to Mark a place and recall back etc. Mark another place.. Recall back. But yeah that svcks that the world map markers don't move or show up.

-Mush-
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Tue Jun 19, 2012 6:27 pm

PlaceAtMe wouldn't work either?
User avatar
HARDHEAD
 
Posts: 3499
Joined: Sun Aug 19, 2007 5:49 am

Post » Tue Jun 19, 2012 7:44 pm

i didnt try with mapmarker, but this don't work with other statics, because statics can't be passed as property, only as objectreference that are somewhere in the world.

And anyway, PlaceAtMe is a kind of constructor, so you will create a new object in memory, and need to keep tracking it
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Tue Jun 19, 2012 11:07 pm

Found the answer. it's yes they can move. The issue started because i placed the initial mapmarker inside an interior. So i placed a new one in an exterior world (in this case riverwood), made it initially disabled, had it set to can always travel, and put a stone as the icon. So now the world updates the world map with the updated mark spell and icon by disabling/moving/ enabling. If marking an interior though it won't mark it at all on the Map, but the marker DOES move. If using Recall, the player does get teleported to wherever the last Mark was cast.

So in short, the above script works, just need to have the mapmarker start in an exterior from what i found.

-Mush-
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am


Return to V - Skyrim