License from €75
DE EN FR ES IT CZ

which is the number of items in the inventory

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 4 years ago
    How to display the number of items that are in the inventory of a character?

    Specifically, some investigation games (e.g., the Case of the Golden Idol) display how many clues you collected. This helps to give a sense of progress, especially if this value is shown as a fraction of the total number of clues that can be collected. In other words, I am looking for the value of nRecordedClues in "v=nRecordedClues>/20" (where 20 is the total number of clues).
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 4 years ago
    A'llo, you would need to use code to amount of items currently held in the active characters inventory.

    Values["nRecordedClues"].Int = #game.CurrentCharacter.Items

    I'm assuming you already know how to display the value in a display text/object text, etc? If not inside of the text you would write: <v=nRecordedClues>/20
  4. · 4 years ago
    Many thanks for your prompt answer.
    You correctly assume that... I'm a newbie so I am stuck despite your answer smile

    This is what I did but it doesn't work (i.e., the text shows '?'). In the inventory of the character 1 I created a 'called by other action' action:
    1) the action first executes the script (Execute script 'Values["nRecordedClues"].Int = #game.CurrentCharacter.Items') 
    2) the second line of the action is a Display text where the text is <v=nRecordedClues>

    I am sure that I am doing something very silly (i.e., some errors in the syntax), but I can't find it...
  5. · 4 years ago
    Are you including those apostrophes in your script, or are you just demonstrating that you used what's in between them?

    Anyway, I really would recommend joining our Discord server if you aren't already on it. It's much easier & faster for getting & providing help than on here.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?