Accessing an object's value via a variable (string)

earmuffs
25 Feb 2016, 02:15
I know about GetAttribute() but is there a way of setting a variable through a string?

As far as I can tell, GetAttribute() is a read-only.

ex:
game['<string attribute>']

I'm trying to loop through a set of attributes using a stringlist, as this would make my evening a "walk in the park".

Thank you very much ^-^

XanMag
25 Feb 2016, 02:56
Ummm... I'm really no good at this part, but there might be some info in here that might prove useful? Or not??

viewtopic.php?f=10&t=5873&p=40905#p40905

Pertex
25 Feb 2016, 07:59
This one:
set (object, attribute, value)


http://docs.textadventures.co.uk/quest/scripts/set.html

earmuffs
25 Feb 2016, 12:32
Thanks Xan for the references :)
Thanks, Pertex! I was looking through the function tab in the documentation...

HegemonKhan
25 Feb 2016, 17:30
@ Earmuffs:

here's some of the useful documentation pages/links:

http://docs.textadventures.co.uk/quest/functions/ (functions, categorical order)
http://docs.textadventures.co.uk/quest/ ... tions.html (functions, alphabetical order)
http://docs.textadventures.co.uk/quest/scripts/ (generally these are really just more functions)
http://docs.textadventures.co.uk/quest/scopes.html (these are found in/under the 'functions' category/link too, but it's nice to have them by themselves for reference)

http://docs.textadventures.co.uk/quest/ ... bject.html (all of the Attributes for Objects, such as the useful 'parent' Attribute)

http://docs.textadventures.co.uk/quest/ ... ments.html (some briefly mentioned very useful things in here, such as 'displayverbs' and 'inventoryverbs')
viewtopic.php?f=18&t=5023 (Pixie's guide on using 'displayverbs' and 'inventoryverbs')

http://docs.textadventures.co.uk/quest/ ... lists.html (lists)
http://docs.textadventures.co.uk/quest/ ... aries.html (dictionaries)

http://docs.textadventures.co.uk/quest/ ... types.html (Object Types)
http://docs.textadventures.co.uk/quest/ ... types.html (Object Types)
http://docs.textadventures.co.uk/quest/types.html (Object Types)

http://docs.textadventures.co.uk/quest/ ... nced_.html (Tabs for the GUI~Editor)
http://docs.textadventures.co.uk/quest/ ... nced_.html (this is on 'Tabs' for the GUI~Editor)

http://docs.textadventures.co.uk/quest/tutorial/ (guides)
http://docs.textadventures.co.uk/quest/guides/ (guides)
viewforum.php?f=18 (guides)
viewtopic.php?f=18&t=5023 (Pixie's guide on using 'displayverbs' and 'inventoryverbs')

http://docs.textadventures.co.uk/quest/ ... notes.html (very useful on the changes that quest and its code syntax has gone through)