Question about setting and checking attributes

clone45
30 Jun 2012, 06:12
Hello,

I'm quite a beginner with Quest and have a question about attributes.

I've successfully been able to set and check object flags. For example, in my game, if you read a specific note, I set the note's "read" flag to true. Then, later in the game, I can check this flag and print a message depending on if the note was read.

However, I haven't been so successful with attributes. I'd like to create an attribute for an object... let's say the attribute is "status". Then, I want to set the attribute to a string value - for example, "waiting". The I want to check to see if that object's status attribute is set to waiting.

But I can't figure out how to do this. I'm using the Quest interface. I've tried this way:

For setting the status when the player enters a room:
---
After entering the room for the first time:
Set variable [bob.status] = [expression] ["waiting"]
---

Printing something out when the status is set to waiting:
---
if: [object attribute equals] Object [object] [bob] Attribute [status] = ["waiting"]
Then... (print something out)
---

I know this isn't correct. I'm pretty confused!

Any help would be much appreciated,

Thanks,
- Bret

clone45
30 Jun 2012, 06:33
Oh, never mind! It actually did work. :-)