Actions
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
Use the action
keyword to give actions to an element.
Actions don't end an atom's behaviour when they match (like rules do).
element Dropper {
change S () => new Sand()
// Drop some sand below me
action {
@ => @
_ S
}
// Afterwards... move into space
any(xyz.directions) @_ => _@
}