Fixed the broken Invisiclue script (just posting so this is seachable)

So the Invisiclues tutorial didn't work for me. After some messing around I figured out two things that are missing from the tutorial and I thought I'd put them here in case anyone else came across the same issue and (like me) doesn't know how to code really and would prefer to have copy-pastable shit.

Following the original tutorial on desktop you want to paste in this script for help2 (using the small codeview button on add script, not going into code view and pasting it)

 if (HasAttribute(game, "defaultbackground")) {
        bg = LCase (game.defaultbackground)
      }
      else {
        bg = "white"
      }
      msg ("Drag your mouse over the text to reveal only the clues you need.")
      foreach (key, help2.helpdict) {
        msg ("<i>" + key + "</i> [<font color=\"" + bg + "\">" + StringDictionaryItem(help2.helpdict, key) + "</font>]")
      } 

The only change is that the script it tells you to copy-paste has "game.helpdict" instead of "help2.helpdict" and while that might be obvious for someone who knows how to code, it was exhausting for me to figure out!!! Hopefully this helps another noob. <3


For creating attributes on the desktop version, the tutorial says:

Once you have the command, you need to put in the data. Go to the Attributes tab of the game object, and create a new attribute, helpdict.

If you follow this instruction as it says in the tutorial, the script given in the tutorial will work.

If you instead go to the Attributes tab of your help2 command, the script you posted will work.

If you're going to advise people to change the script, you should probably also tell them about the other change that is necessary so that it still works.

(For the web-editor version, you would just need to change game.helpdict to help2.helpdict in both scripts)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums