Multiple flags
Stebsis
16 Oct 2011, 14:13Hi,
I'm making a crime game(a really simple one at first) with Quest, and i'm still quite new so I'm sorry if this is a bit hard to understand
I read the tutorial, but I just can't figure out how I can make the script to check if someone has multiple flags. For example, if I talk to a woman, she gives me a clue about murderer(adding a flag to the murderer), but his isn't enough to convict him, so i need to talk to a man, so i can get another clue(flag) and when I talk to the police, they check if the murderer has those flags and he can arrest him. But I don't know how to put "and" mark, like: If, object has flag, object: murderer, flag name: murderer and killer. So how can i get it to check is he has both murderer AND killer flags, or is there more simple way to do this?
I'm making a crime game(a really simple one at first) with Quest, and i'm still quite new so I'm sorry if this is a bit hard to understand

Alex
16 Oct 2011, 15:39One way to do it would be to add a second "if" inside the "Then" for the first flag.
So the script would look like:
Alternatively, if you change the first drop-down to "expression", you'll see the generated expression for "object has flag". It looks like this:
You can simply add the word "and" followed by another condition, for example:
So the script would look like:
If [object has flag] [object] [man] [flag name] [murderer]
- Then: If [object has flag] [object] [man] [flag name] [killer]
- - Then: ...
Alternatively, if you change the first drop-down to "expression", you'll see the generated expression for "object has flag". It looks like this:
GetBoolean(man, "murderer")
You can simply add the word "and" followed by another condition, for example:
GetBoolean(man, "murderer") and GetBoolean(man, "killer")
Stebsis
16 Oct 2011, 17:10Thank you very much! It works now