CitizensDev/Citizens2 — Issue #6: Environment Interactions
Author: Silvanarix
Created: 2012-02-23 20:21:17+00:00
State: open

I was wondering if it would be possible to give an NPC the ability to flip a lever or press a button. I wanted to create a castle guard that could toggle a lever to open the courtyard gates, and perhaps after a keyword he toggles it back. Scenario below:

I walk up to the gate: I say a passphrase such as "Open the gates"
Guard flips the lever
I walk in and say a passphrase: "Thankyou"
Guard flips the lever

I assume this would need a listen radius of some sort. Perhaps the guard listens for commands within 10-15 blocks. I do not know much about java or the workings of minecraft. Hope you enjoy the suggestion! Thanks!