☄️
SpaceTode
  • Introduction
  • Element
  • Properties
  • Data
  • Arguments
  • Rules
  • Diagrams
  • Inputs
  • Outputs
  • Transformations
  • Symmetries
  • Symbols
  • Event Arguments
  • Maybe
  • Point of View
  • Actions
  • Mimic
  • Sub-Elements
  • Blocks
  • Scoping
  • JavaScript
  • Behave
  • Tabs and Spaces
Powered by GitBook
On this page

Was this helpful?

Actions

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) @_ => _@
}
PreviousPoint of ViewNextMimic

Last updated 3 years ago

Was this helpful?