Jump to content

Cell name as text


Recommended Posts

Is there any script that can get the cell name as text to be put into a message? I'm looking for something that changes as the location of an item changes. Activate something and get a messagebox "I am in wherever". I can't seem to find anything in the WIKI that looks likely to help.

Link to comment
Share on other sites

Use SKSE's GetName function and apply it to the cell or location. If there is no name in the name field, it will return a NONE value.

 

Examples:

String myLocation = myObjectRef.GetCurrentLocation().GetName()

String myCell = myObjectRef.GetParentCell().GetName()

 

How to get the string into the message box itself? Not sure. I have rarely worked with message boxes.

Link to comment
Share on other sites

Thanks, IsharaMeridin. I was planning some markers that could be placed by the player in any cell. I was trying to find a way to use a messagebox with buttons to give the player a choice of which to remove. I wanted to have the cell it was in be shown instead of item 1 through 4 in the buttons. I might have to leave that bit for more thought later. oh well. There are only 4 buttons. Can't be that hard to remember which one was where.

Link to comment
Share on other sites

Thanks, IsharaMeridin. I was planning some markers that could be placed by the player in any cell. I was trying to find a way to use a messagebox with buttons to give the player a choice of which to remove. I wanted to have the cell it was in be shown instead of item 1 through 4 in the buttons. I might have to leave that bit for more thought later. oh well. There are only 4 buttons. Can't be that hard to remember which one was where.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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