This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
lua:flagset [2014/06/20 19:44] vodur created |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <code lua> | ||
- | T:flagset( flag [, value] ) | ||
- | </code> | ||
- | |||
- | Arguments: | ||
- | flag - string value. | ||
- | value - boolean value. Optional argument, true by default. Designates whether the flag is to be set or unset. | ||
- | |||
- | Return value: none | ||
- | |||
- | Set or unset the given flag on the lua object. | ||
- | |||
- | Example: | ||
- | |||
- | <code lua> | ||
- | mob:setact("safe") | ||
- | mob:say("I'm safe now.") | ||
- | mob:setact("safe",false) | ||
- | mob:say("Now I'm not safe.") | ||
- | </code> | ||
- | |||