Help with displaying a property

Medic375th
27 Aug 2018, 05:59

In the older versions of Quest (before 5.0) you could give an object a property called "weight" and then assign a value to "weight"
Then for the Look command you could just type (for example) A bag of sugar weighing, #sugar:weight" grams. Then when playing the game and type in Look at Sugar and it would display - "A bag of sugar weighing, 1000 grams"
This could all be done easily with out going into code view.
Is there a way to do it in the newer version of Quest without having an expertise in coding because my knowledge of coding is slim to none?
Thank you


Dcoder
27 Aug 2018, 07:06

"Attributes" are used in lieu of "properties", and those attributes are assigned a value just as would be to a property . You can create attributes for any object, including rooms/exits and the game and player objects. You don't need to go into code view to do this; just go to the Attributes tab for that object and add it. Keep in mind that each attribute will (mainly) be of a "string", "dictionary", "object", "integer", or "script" type, with its corresponding value also being of that type.


mrangel
27 Aug 2018, 08:35

For the weight example you give, the description would be "A bag of sugar weighing, {sugar.weight} grams".


Medic375th
27 Aug 2018, 20:34

@Dcoder - Thank you!

@mrangle - Thank you! So instead of "#" symbols as in the older version I should use "braces"? I guess it will take me awhile to get used to the changes in the new version. LOL


mrangel
27 Aug 2018, 21:17

I don't know the older version, but from what you posted I think so.