Help with flags, alternatively lists?

FeedMeOreos
27 Apr 2020, 23:37

I am currently trying to create a To-Do list in my game. I had some trouble using an actual list for it, since I wanted to edit the text (strikethrough a completed task, for example), so I decided to work around it by creating a To-Do list as an invisible object, and making the tasks part of the description. Currently, I am trying to make it so looking in a mirror sets the flag "seen" on the object player, and that returns the list struck through. I am doing it with the following code:

If object does not have flag - object - player - flag "seen",
Print message "- Figure out what I look like."

Else,
Print message <strike> "-Figure out what I look like"</strike>

However, when I call the "todo" command, it returns this:

> todo
Script: if (not GetBoolean(player, "seen")) { msg ("Figure out what I look like.") }

How can I make it not give me the whole script?


mrangel
28 Apr 2020, 08:46

Two options:

  1. Change the attribute to be a string rather than a script and use the text processor:
{if player.seen:<strike>}"Figure out what I look like."{if player.seen:</strike>}
  1. Run the script instead of printing it. Not sure what that looks like in the GUI; but in code view it's just a case of changing msg to invoke in the script that prints the other script.