position
position <creature>
The body position of a creature, as a word.
Position describes the creature's current posture or state — whether they are standing, sitting, sleeping, fighting, and so on.
Arguments
<creature>— the creature to inspect.
Returns
A string — the position name, such as Standing, Sitting,
Resting, Sleeping, Fighting, or Dead.
Examples
after command (say) {
do "say You are currently [position $actor]."
}
When the actor is the mob Puff on its feet, [position $actor]
evaluates to Standing, and the mob says "You are currently Standing."
Branch on the posture with streqi:
after command (poke) {
require [streqi [position $actor] "Sleeping"]
do "say Wake up!"
}
The require guard advances to the next matching
handler unless the actor is asleep; only a sleeping actor is told to wake.