Okay, I get the feeling that I should know this, but here it goes...
Is it possible to display an object's property? For example, say I wanted to make a "food" object, with a "taste" property equal to "sweet." Would it be possible to make it so that it would say something like, "You eat the #food#. It tastes ______?" But in the blank would be that property? Help would be appreciated.
edit: Oh, and I plan to make like a "Life" sort of game. Instead of making a seperate eat procedure for each item, I would like to make it somewhat easier, and use a property, but I don't know how to display properties.
I think Im Dead
21 Feb 2004 05:54
Yep, you'd basically make a command <eat #object#> have it test that the object is edible, if it is, then msg <You eat #object#. It tastes $objectproperty(#object#; taste)$> and it's done.
Jordan
21 Feb 2004 06:00
Thank you, ITID. Your help is appreciated (at least by me).
Alex
21 Feb 2004 16:50
Slightly more readable (but works just the same):
msg <You eat #object#. It tastes #object:taste#>
Alex
21 Feb 2004 16:51
Actually even better would be:
msg <You eat #@object#. It tastes #object:taste#>
with the @ sign. Then if "object" has an alias, that will be displayed instead of the code name.
Jordan
07 Mar 2004 01:58
Thanks Alex, but now I'm back with another question! Whoopee! Anyway, now my question is....
How do you run an object's "action" script, as under "Properties and Actions...."
Yes, another simple one, but I would still appreciate help.
I think Im Dead
07 Mar 2004 03:21
doaction <objectname; objectaction>
Jordan
07 Mar 2004 05:28
Thanks again, ITID.
codingmasters
16 Mar 2004 05:54
For that matter, how do you activate an Action using QDK commands?
Matthew G.
Jordan
16 Mar 2004 15:48
Edit..
Add Command
Objects
Run an object's(or room's) action script
Or, under "Other Script Command", which is under "Other", put in "doaction <objectname; objectaction>", then it will detect it and set it to the above.
codingmasters
19 Mar 2004 00:04
Thanks for the help
Matthew G.
paul_one
10 Apr 2004 16:22
Alex - I thought #@name# returned the ACTUAL name of the object when ou use the alias....
Is the reverse true? So it both fetches the alias AND original name when you use it (depending on which is used)...