📝Behavior Scripts
Behavior Scripts are ‘plugins’ of Morpheus.
Behavior Scripts are programs external to Morpheus Platform. They implement behaviors — event-based interactivity of Artifacts. Artifact developers can extend platform functionality using Behavior Scripts to make complex features out of simple blocks.
For example, a Scoreboard is a Content Display that changes its text every time it is hit by a Boxing Glove.
Hosting of Behavior Scripts
Behavior Scripts are designed to be developed by third parties as well as in-house. There are several options of where Behavior Scripts can be hosted:
Assigning Behavior Scripts
For a Behavior Script to work, it must be associated with a certain behavior. In other words, a behavior must be created in a Place and then connected with Objects via Behaviors.
It could be done by several ways:
When an object is spawned, it can be already inhabited by a behavior (or behaviors).
behaviors can be specified either in Module Manifest or in Module Config.
Behavior Script URL
is provided in the spec.same specification may contain two filters —
listen
andcontrol
— which will serve as dynamic connectors of this particular.
place
messages can be sent with hope there is a Place Script which listens to them and enacts.
Behavior can change their sources
and subordinates
dynamically by sending messages as described above.
END
Last updated