How do I set a status attribute to words

I know that ! represents a number but I want to make it a word. What symbol do I use?


the '!' displays the Value of the Attribute, so you need a String Attribute, which has a String Value (words/text):

an example:

<object name="player">

  <attr name="alias" type="string">Joe</attr>

  <attr name="age" type="int">18</attr>

  <statusattributes type="stringdictionary">

    <item>
      <value>alias</value>
      <key>Name: !</key>
    </item>

    <item>
      <value>age</value>
      <key>Age: !</key>
    </item>

  </statusattributes>

</object>

----------------------------

// output/displays (in the status pane on the right side during game play):

Name: Joe
Age: 18

Isn't that what the return string function is for? (I mean, I'm just guessing...)


Uh so I set it in the start up script? I want it to be for the player and show up in the game panes


When setting an Attribute, you can set the type of Attribute it will be. A String is literally just any text you want it to be, even a word, so just set the Attribute to be a string.


If you're not using the desktop version, I can't help, since I don't know how it works when not using GUI. I just know you just need to make a String Attribute.


for off-line/desktop quest:

'player' Player Object -> 'Attributes' Tab -> 'status attributes' box (the middle box I think) -> (set it up, see below)

an example:

Attribute Name (key): alias
Status Attribute Value (Value) ("format string field"): Name: !
// using: player.alias = "HK"
// output/displays: Name: HK


for on-line/web quest, via scripting:

'game' Game Settings Object -> 'scripts' Tab -> 'start' Script -> (see below)

add new script -> 'variables' section/category -> 'set a variable or attribute' Script -> (see below)

set variable player.statusattributes = [EXPRESSION] NewStringDictionary ()

add new script -> '???' section/category -> 'list add' Script -> (see below, shown in code below, as I don't know the GUI/Editor)

// examples:

list add (player.statusattributes, "alias", "Name: !")
list add (player.statusattributes, "sex", "Sex: !")
list add (player.statusattributes, "age", "Age: !") // pretending I'm 18, lol

// or (if the above doesn't work), this syntax might work:

list add (player.statusattributes, "alias", "Name: " + !)
list add (player.statusattributes, "sex", "Sex: " + !)
list add (player.statusattributes, "age", "Age: " + !)


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

Support

Forums