multiple conditions for locks

19 views
Skip to first unread message

Quilnux

unread,
Feb 11, 2021, 11:42:29 PM2/11/21
to Evennia
So I have a lock on an exit that requires the character to have a certain object in their inventory before they are able to traverse the exit. This works as expected. But, I would like to extend it to allow traversal if a second condition is met. Can I have the traverse lock listed twice? Or is there another way of doing this?

Griatch Art

unread,
Feb 13, 2021, 5:41:34 AM2/13/21
to Evennia
Yes, for example `traverse: carries(key) or carries(crowbar)`
You can check out the documentation for locks here: https://www.evennia.com/docs/latest/Locks.html#defining-locks
.
Griatch

Griatch Art

unread,
Feb 13, 2021, 5:43:00 AM2/13/21
to Evennia
... It may be `holds()` for carrying coming to think of it, but the point stands.

Quilnux

unread,
Feb 13, 2021, 9:44:36 AM2/13/21
to Evennia
Yes, it's holds().. Thanks! now I just need to figure out how to push that using an attribute (door_unlocked). Evennia is exciting!
Reply all
Reply to author
Forward
0 new messages