Creating a to do list that updates when missions are completed

NecroDeath
04 Jul 2018, 14:05Hi,
I'd like to have an object in the game which is a to-do list, that has the main quest missions of my game written down, e.g.
- Find fuel
- Scare the gamekeeper
etc.
But I'd like to update the list with either strikethrough text or a tick next to the mission item (if an object flag = X), and perhaps add an item to this list later in the game.
XanMag
04 Jul 2018, 16:50So...
How many things are on the To Do list?

NecroDeath
04 Jul 2018, 16:59Four
mrangel
04 Jul 2018, 18:13For the general case, I'd make this a stringdictionary.
Off the top of my head:
<object name="todolist">
<alias>To-do list</alias>
<look type="script">
result = "<u>To-do list</u><ul>"
foreach (item, this.items) {
test = DictionaryItem (this.items, item)
if (Eval (test)) {
result = result + "<li><s>"+item+"</s></li>"
}
else {
result = result + "<li>"+item+"</li>"
}
msg (result + "</ul>")
}
</look>
<attr name="items" type="stringlist">
<item>
<key>Find fuel</key>
<value>GetBoolean (fuel tank, "hasbeenmoved")</value>
</item>
<item>
<key>Scare the groundskeeper</key>
<value>groundskeeper.is_scared</value>
</item>
<item>
<key>Take damage</key>
<value>not game.pov.health = 100</value>
</item>
</attr>
</object>