I’m trying to create security doors and keycards, so I started with the following definitions:
A seclev is a kind of value. The seclevs are green, yellow, red, and private.
A security door is a kind of door. A security door has a seclev. The seclev of a security door is usually green. A security door is usually closed.
A keycard is a kind of thing. A keycard has a seclev. The seclev of a keycard is usually green.
Creating doors that are security doors and cards that are keycards seems to work fine, but when I try to check to make sure that the player is carrying a high enough level keycard, I can’t seem to get the comparison to work.
If I do this:
Check opening a security door when the player is carrying a keycard:
if the security door is yellow and the keycard is green:
say "Access Denied! This door requires a Yellow security card or higher." instead.
I get this error message: ‘security door is yellow’ was okay; ‘the keycard is green’ did not make sense; so I ran out of ideas.
Security door and keycard both have seclevs, so I don’t understand why one is a valid condition but the other isn’t. I’m sure it’s something I’m doing wrong, but I can’t figure out what it is.
As always, any help would be greatly appreciated!
Cheers,
Scott