Login
Remember
IF Answers
Ask a Question

# I need help with attributes.

–1 vote
217 views
asked Jul 25 in Authoring by Tyson Grant (1 point)
edited Jul 26 by Dannii

I am limited to the browser version of Quest, and I would like to know how to make custom status attributes that show in the menu on the side when being played.

- status-attributes
- quest

## 1 Answer

0 votes
answered Jul 26 by hegemonkhan (161 points)
selected Jul 27 by Tyson Grant
Best answer

an example:

'pages' -> 'page1' -> Page Type: [script] or [text+script] -> (see below)

The Attributes:

add new script -> variables -> 'set a variable or attribute' Script -> set variable player.strength = [expression] 0

The Displayment of those Attributes in the Status Pane during game play (via the built-in 'statusattributes' String Dictionary Attribute):

add new script -> variables -> 'set a variable or attribute' Script -> set variable player.statusattributes = [expression] NewStringDictionary () <----- these are parenthesis, it's not a zero, nor the letter 'O'.

(I don't have quest open at the moment, so this will be in code, but hopefully you can figure out how to do it via the GUI~Editor's Scripts):

dictionary add (player.statusattributes, "strength", "Strength: " + player.strength)

outputs~displayment:

Strength: 0

this should work... hopefully... let me know if it doesn't. Or, let me know if you want to do anything more fancy, as this was only a simple example for you.

for example of something more fancy, outputs~displayment:

Life: 999/999

commented Jul 27 by Tyson Grant (1 point)
edited Jul 27 by Tyson Grant
I tested this on the Gamebook and it worked, thank you, I'm going to try this on the Text adventure I'm working on.
It didn't work. :(
commented Oct 19 by Toris (1 point)
I don't seem to have the option to set Newstringdictionary only expression. Is there a way for me to see dictionary's in gamebook? Or do I need to make them somehow? Trying to display them and get them put in a dictionary.
Thanks ahead of time

## Related questions

- Online version of Quest: How do I change the value of Status Attributes?
- Quest: if's, exits, blocking and attributes
- Help! I need to use a candle as a light source in rooms in my Quest text adventure game
- Quest: How do I change status attributes?
- How do I work with lists in Quest?

...