Jump to content

MapMarker.Is...?


Duk3nat0r

Recommended Posts

Hi, hope someone can help with a little bit of scripting. I'm trying to check if a map marker has been discovered to enable a teleporter. This is the script I wrote for it:

 

ObjectReference Property MapMarker Auto
ObjectReference Property Teleporter Auto
Int Property DoOnce Auto
GlobalVariable Property tdNPDisplayMAX Auto

Event OnCellAttach()
     if DoOnce == 0
     if MapMarker.IsEnabled() == true
          if Teleporter.IsEnabled() == false
               Teleporter.enable()
               DoOnce = 1
               tdNPDisplayMax.SetValue(tdNPDisplayMax.GetValue() + 1)
          endIf
     endif
endif

endEvent

then I realized it's not gonna work. The map marker is enabled to begin with, but how do I script to check if it's been discovered or not?

 

Link to comment
Share on other sites

I need to bump this, as I'm still looking for a solution.

 

I also tried:

 

if MapMarker.IsMapMarkerVisible() == true

 

but, it doens't realy work, it enables the teleporter even though the mapmarker hasn't been discovered yet.

Edited by Th3 Duk3
Link to comment
Share on other sites

Ok, I finally got it to work, so if anyone is looking for something similar, here is the code:

ObjectReference Property MapMarker Auto
ObjectReference Property Teleporter Auto
Int Property DoOnce Auto
GlobalVariable Property DisplayMAX Auto


Event OnCellAttach()
if DoOnce == 0
if MapMarker.CanFastTravelToMarker() == true
           if Teleporter.IsEnabled() == false
                Teleporter.Enable()
                DoOnce = 1
                DisplayMax.SetValue(DisplayMax.GetValue() + 1)
           endif
      endif
endif

endEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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