Willy4x4 Posted March 3, 2013 Posted March 3, 2013 Hi everyone, I have a question about Map markers, because I'm making a mod with an MCM that will let you enable/disable some specific ones, i know once you find a place it will show up on your map, but how would i disable it from displaying on my map?I can't seem to find anything , found "tmm" which shows them all but i want it just for a specific map marker not all...
littleork Posted March 3, 2013 Posted March 3, 2013 yourmarker.disable() or yourmarker.getreference().disable() might work in your script. to enable, just change disable to enable.
Willy4x4 Posted March 3, 2013 Author Posted March 3, 2013 yourmarker.disable() or yourmarker.getreference().disable() might work in your script. to enable, just change disable to enable.That is the script command i tried but it didn't seem to disable it :( Is this the right way to check if the Global Variable has changed? Scriptname Mapmarker extends ObjectReference ObjectReference Property Ore Auto GlobalVariable Property Mapmarker_OnOff Auto Function SomeFunction() RegisterForUpdate(5.0) ; Before we can use OnUpdate() we must register. EndFunction Event OnUpdate() ; This event occurs every five seconds If (Mapmarker_OnOff.GetValue() == 1 ) Ore.Enable() Else Ore.Disable() EndIf EndEvent
Willy4x4 Posted March 3, 2013 Author Posted March 3, 2013 (edited) yourmarker.disable() or yourmarker.getreference().disable() might work in your script. to enable, just change disable to enable.That is the script command i tried but it didn't seem to disable it :( Is this the right way to check if the Global Variable has changed? Scriptname Mapmarker extends ObjectReference ObjectReference Property Ore Auto GlobalVariable Property Mapmarker_OnOff Auto Function SomeFunction() RegisterForUpdate(5.0) ; Before we can use OnUpdate() we must register. EndFunction Event OnUpdate() ; This event occurs every five seconds If (Mapmarker_OnOff.GetValue() == 1 ) Ore.Enable() Else Ore.Disable() EndIf EndEvent I changed some things in the script and it now seems to work :smile:But I'm going to make like a 500+ of these events so I'm not sure that checking every 5 secs (or even more) is the right thing to do, i only want it to update every time the Global Variable has changed :/ Scriptname Mapmarker extends ObjectReference ObjectReference Property Ore Auto GlobalVariable Property Mapmarker_OnOff Auto Event Onload() RegisterForUpdate(5) EndEvent Event OnUpdate() ; This event occurs every five seconds If (Mapmarker_OnOff.GetValue() == 1 ) Debug.MessageBox("Enabled") Ore.Enable() Else Debug.MessageBox("Disabled") Ore.Disable() EndIf EndEvent EDIT: Ended up doing the Property Settings directly In the MCM Script ^^ , Solved Edited March 3, 2013 by Willy4x4
davidgilbertking Posted May 20, 2020 Posted May 20, 2020 yourmarker.disable() or yourmarker.getreference().disable() might work in your script. to enable, just change disable to enable.That is the script command i tried but it didn't seem to disable it :sad: Is this the right way to check if the Global Variable has changed? Scriptname Mapmarker extends ObjectReference ObjectReference Property Ore Auto GlobalVariable Property Mapmarker_OnOff Auto Function SomeFunction() RegisterForUpdate(5.0) ; Before we can use OnUpdate() we must register. EndFunction Event OnUpdate() ; This event occurs every five seconds If (Mapmarker_OnOff.GetValue() == 1 ) Ore.Enable() Else Ore.Disable() EndIf EndEvent I changed some things in the script and it now seems to work :smile:But I'm going to make like a 500+ of these events so I'm not sure that checking every 5 secs (or even more) is the right thing to do, i only want it to update every time the Global Variable has changed :/ Scriptname Mapmarker extends ObjectReference ObjectReference Property Ore Auto GlobalVariable Property Mapmarker_OnOff Auto Event Onload() RegisterForUpdate(5) EndEvent Event OnUpdate() ; This event occurs every five seconds If (Mapmarker_OnOff.GetValue() == 1 ) Debug.MessageBox("Enabled") Ore.Enable() Else Debug.MessageBox("Disabled") Ore.Disable() EndIf EndEvent EDIT: Ended up doing the Property Settings directly In the MCM Script ^^ , Solved Brother, I am looking for the exact same thing right now: I want to disable auto creation of map markers, in order to place them myself. Did you find a way how to do it? Could you please share it?
Recommended Posts