kts.ActorIsKnight

Name

kts.ActorIsKnight – return true if the current actor is a Knight

Synopsis

result = kts.ActorIsKnight()

Description

If the current actor (as defined by cxt.actor) is a Knight, this function returns true.

If the current actor is not a Knight, or if no current actor is defined (i.e. cxt.actor is nil), then false is returned.

Errors

If cxt.actor is defined (non-nil) but is not a valid Creature, the error "Bad userdata" will be generated. (Note that this is not usually possible, unless Lua code has been modifying the value of cxt.actor directly.)

Notes

This function is equivalent to calling kts.IsKnight(cxt.actor).

See Also

The Context table (cxt)

kts.IsKnight