My/en: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 14: | Line 14: | ||
==Example== | ==Example== | ||
[[File: | [[File:up_example.gif|alt=My example gif|thumb]] | ||
[[File: | [[File:up_example.png|alt=My example code|thumb]] | ||
The use of the ‘my trait’ block in this example ensures that the fish do not swim below the seafloor by ensuring their z coordinate, selected from the traits drop down, is >= 0 before the fish are rendered. | The use of the ‘my trait’ block in this example ensures that the fish do not swim below the seafloor by ensuring their z coordinate, selected from the traits drop down, is >= 0 before the fish are rendered. |
Latest revision as of 18:36, 16 August 2023
Usage
Returns the value of an agent's trait.
Syntax
Inputs in this block:
- a category of trait from the dropdown menu
Example
The use of the ‘my trait’ block in this example ensures that the fish do not swim below the seafloor by ensuring their z coordinate, selected from the traits drop down, is >= 0 before the fish are rendered.