Manyland

A Dynamic can be used to animate something in a variety of ways. For every Dynamic, you provide a way the animation should behave, for instance:

0s: cell 1 show
1.5s: cell 1 opacity .8, cell 2 opacity 0.5
2-5s: cell 1 down 5, rotate 20
6s: restart

The left part indicates the time in seconds something should happen. It can be any number from 0 to 15, or a time range like 2-5s meaning stretched from seconds 2 to 5. (Note Dynamics in Holders have no limit of 15 seconds.) For instance, if you write "2-5s: cell 1 down 5", it means that cell number 1 smoothly moves down 5 pixels over the course of second 2 to 5 (commands which can't span over time will be set at the beginning of the time frame). Note if you want you can leave out the "s".

All cells you reference need to be added using the "+" button at the top during creation. The cells are drawn on top of each other in the order from 1 to 9, but you can change the z-index to determine how they will layer (see below commands overview). By default, at the beginning and after the restart, all cells are back to their normal position, hidden, and otherwise reset.

Multiple commands per second are separated by a comma. You can add several commands referencing the same mentioned cell by omitting the cell name on successive commands in that line.

You can add new lines and space indention to make multiple commands more readable (the comma then becomes optional). The following acts exactly the same as above Dynamic sample:

0: cell 1 show

1.5: cell 1 opacity .8,
     cell 2 opacity 0.5

2-5:
cell 1 down 5
rotate 20

6: restart

(You still need to keep each command in one line, but you can add newlines between successions of numbers, like when using the Shape command.)

Timing can also be provided relative to the last value by using "+", like this (also note you can write e.g. "0.5" as ".5"):

+0.5: cell 1 show
+.5: cell 2 show
+0.5-+2.5: cell 3 show
+0.5: restart

Commands overview

can span over time?
cells...References all cells, e.g. "cells hide" will hide cell 1 to 9
cell [n]...References a single cell, e.g. "cell 2 opacity 0"
cells [n]+[n]
cell [n]+[n]
...References multiple specific cells, e.g. "cells 1+3+4 up 10" (you can write either "cell" or "cells", but can't put spaces around the "+")
...up [n]Moves this cell n pixels up, e.g. "cell 1 up 3"
...down [n]Moves this cell n pixels down, e.g. "cell 1 down 2"
...left [n]Moves this cell n pixels left, e.g. "cell 1 left 3"
...right [n]Moves this cell n pixels right, e.g. "cell 1 right 2"
...position [x y]Sets the absolute position, like "cell 1 position -50 -50"
...opacity [n]Sets the opacity for a cell, from 0 to 1, e.g. "cell 2 opacity 0.5" would show this cell overlaying at half transparency
...hideHide shows the cell at full opacity, e.g. "cell 2 hide" (which would equal the "cell 2 opacity 0" command)
...showShows the cell at full opacity, e.g. "cell 2 show" (equal to "cell 2 opacity 1")
...rotate [n]Rotates this cell in clockwise direction by an additional n degrees, e.g. with "cell 2 rotate 20", 60 degrees would now be 80. Use negative values to rotate counterclockwise, e.g. "cell 1 rotate -90". Use the "pivot" command to set the center around which is rotated
...rotation [n]Same as above, but sets the absolute instead of relative rotation degrees.
...light [red green blue]Lights the environment with the provided colors, like "light 255 0 0" (the light opacity is the cell opacity)
...pivot [x y]Sets the absolute rotation center for a cell, e.g. "cell 1 pivot 2 2" would set the rotation near the top left of the cell. Dynamics have a maximum size of 29x29 pixels. (The default pivot is at the center of the full 29x29 size, 14.5 14.5, and the bottom block center within it would be at 14.5 19.5). On desktop, you can get the cursor's pixel coordinates on the canvas by pressing P.-
...flip horizontalMirrors the cell horizontally, e.g. "cell 2 flip horizontal". A second flip later reverts things back.-
...flip verticalMirrors the cell vertically, e.g. "cell 2 flip vertical"-
...accelerate down [n]Sets the acceleration of downwards velocity, e.g. for gravity of particles you may want to use an up movement over time combined with a one time "cell 1 accelerate down .005" (note this value and overall velocity are capped)-
...accelerate up [n]Accelerates upwards, e.g. "cell 1 accelerate up .005"-
...accelerate left [n]Accelerates leftwards, e.g. "cell 1 accelerate left .005"-
...accelerate right [n]Accelerates rightwards, e.g. "cell 1 accelerate right .005"-
...crop [x1 y1 x2 y2]Crops the drawn image using this top left and bottom right corner of a rectangle (relative to the top left corner of your creation canvas). Press the key P during creation to see the currently hovered pixel coordinates. Note cropped cells will not be drawn if the system runs on very low frame rates.-
...z-index [n]Defines at which layer, from back to front, this will be drawn, e.g. "cell 5 z-index 1" would set cell 5 to be drawn in the back, overlaid by other cells. The z-index cannot exceed your number of cells.-
...brightThis will draw the cell in a different, brighter overlay method which lets the colors shine. For instance, you can use "cell 3 bright".-
...unbrightThis resets the "bright" command and reverts to normal overlaying-
Text
...text [some text]Sets this text, e.g. "hello world". It will be center-aligned at the pivot, without cell rotation and flip. For line breaks use "[break]", for commas "\,", and for colons "\:". Please note text won't show in all locations.-
...font [keywords]Sets the font for the text command for this cell. Use the keywords "white" or "black", and optionally, "small". E.g. "white" or "small black" ("small white" is default if no font is picked).-
...align [left/ center/ right]Aligns the text, e.g. "align left". The default is "center".-
say [some text]Makes the Dynamic say this (for up to 100 characters). Use "\," for commas. Please note speech won't show in all locations.-
Grabbing People
...grabFor Dynamics using the Starts on Touch attribute, this grabs the person and attaches it to this cell's position and rotation. Grabs need to be initiated in second 0. (Note having a Wearable with the "Grab Resistant" attribute disables grabbing.)-
...ungrabThis reverts the grab command and lets go of the person again-
Global Timing
...seconds angleTies the angle of this cell to a rotation resembling the seconds hand of an analog clock 
...seconds angle in stepsSame as above, but ticks in 1-second steps instead of a constant rotation 
...minutes angleTies the angle of this cell to a rotation resembling the minutes hand of an analog clock 
...minutes angle in stepsSame as above, but ticks in 1-minute steps instead of a constant rotation 
...hours angleTies the angle of this cell to a rotation resembling the hours hand of an analog clock 
...hours angle in stepsSame as above, but ticks in 1-hour steps instead of a constant rotation 
Drawing Polygons & Circles
... shape [x y  x y  x y ...] The points of a polygon to paint in x y x y ... order (from 3-100 points with values of up to 600 for each x and y, and up to 1 decimal place). The 0 0 position is in the upper left of the canvas when you draw the Dynamic.

Hit P on desktop to see the current coordinates when hovering over the drawing canvas. You can also click in the world while the Dynamic text editor is open to paste the current relative coordinates. Use Shift+Arrows to move the live preview.

See the fill and gradient commands below for more, as well as the full example. Shapes where no value exceeds 50 can be used in more contexts, like as attachments.
-
...circle [x y radius]Draws a circle. Circles where no value exceeds 50 can be used in more contexts, like as attachments.-
...fill [dark/ bright] [r g b a]The rgba (red green blue alpha) values for the shape fill color (see above for the shape command). Each of rgb ranges from 0-255, and alpha from 0.0-1.0. You can optionally add the dark keyword for shadow-like and bright for light-like overlay effects. (Note dark/ bright may be ignored on some mobile devices to improve speed.)-
...gradient [x1 y1  x2 y2  r g b a]To create a linear color gradient, provide the start x y followed by end x y of the gradient line, followed by the rgba values (as above).-
gradient [x y radius  r g b a]To create a radial gradient instead, provide the center x y and the radius, again followed by the rgba values.-
gradient [x1 y1 radius1  x2 y2 radius2  r g b a]To create a gradient of two separate center and radii, provide the first center x y and radius, then the second, followed by the rgba values.-
...outline [size  r g b a]Use this to give polygon shapes and circles an outline of the given line width (in the current pixel scale, and up to 50) and color.-
More
removeRemoves the Dynamic if it's worn as attachment. E.g. "3s: remove"-
restartWill go back to second zero and start the animation over with resetted values, e.g. "6s: restart"-
play soundPlays the included Sound, if available (it plays at most once per second)-

Tip: If you want to find the placement origin of a Dynamic where the cell positions are moved quite a bit, you can use the Insight boost "Dynamic Origin".

Placeholders

You can use the following placeholders in texts for the text and say commands:

[date]Shows the current date in Manyland Time
[time]Shows the current time in Manyland Time
[name]Shows the name of the person currently closest to the Dynamic
[center distance]Shows the distance to an area's center in manymeter
[people]Shows the number of people nearby
[state]For use on Multis
[holder page]If the Dynamic is inside a Holder, shows the current page number
[holder page count]If the Dynamic is inside a Holder, shows the current amount of pages (not including the last empty one)
[ad area]The currently advertised area, if any.
[ad text]The ad text of the currently advertised area, if any.

Starts on Touch attribute

When you hit "..." and tick the Starts on Touch attribute, the Dynamic will start only when one runs over it. Before that and after the animation ended, it will show its 0 seconds inited state.

The Clonable attribute on the other hand allows someone else to copy this Dynamic into the creator to amend and save.

The Behind attribute

Ticking the "Behind" attribute will make the Dynamic appear behind an Interacting which may have triggered it.

The Attachable, Follows and Closely Follows attributes

If you want to put on the Dynamic to walk around with it, tick any of these attributes via the "..." button:

Using any of these attributes now also lets you add the Dynamic to the Motion bar, similar to how you can add Motions or Bodies to it. Just hit down while standing somewhere, then drag & drop the created Dynamic into the top row.

You can now also use this Dynamic via the "/gives ..." command in Interactings to have it be put on. You can remove it via "/removes dynamic", and check for it being put on by using "they have attached ..."

Text-only Dynamics

Dynamic code not containing any colons will be interpreted as plain-text with font "white", so the following:

HELLO WORLD, I'M JUST...
TESTING

... equals:

0: cell 1 opacity 1, font white, text hello world[comma] i'm just...[break]testing

Markers

Markers are different sections in a Dynamic which are triggered in certain contexts. For instance, the marker "move" is triggered when the Dynamic is attached to someone and they move*. Now only your Dynamic code written in that section is used, with everything else ignored. For instance:

0: CELL 1 SHOW

MOVE
0: CELLS SHOW
0-5: CELL 2 ROTATE 180

RISE
0: CELLS SHOW
0-5: CELL 3 ROTATE 180

*To attach a Dynamic, use one of the attributes Attachable, Follows or Closely Follows, then drop the saved creation over yourself.

The following markers are available (you can also write e.g. "moves" instead of "move"). Unless otherwise noted, they're for when attached to a body:

moveWhen moving left or right
actionWhen space or the action button is pressed (requires the attribute Actionable)
riseWhen one rises, like in the upwards phase of a jump
fallWhen one falls, like in the downwards phase of a jump
startOnce when the Dynamic starts, like when equipped
mounted riseWhen one goes up while in a mountable or flying mountable
mounted fallWhen one goes down while in a mountable or flying mountable
climbWhen one climbs a climbable
swimWhen one swims in liquid
createWhen one creates something
sitWhen one sits on something (to test, create a thing and name it e.g. "chair")
lieWhen one lies on something (to test, create a thing and name it e.g. "bed")
state [any of 0 - 10]
odd state
even state
negative state
private
randomize
private randomize
These are for use on Multis
profile main
profile body
profile name
profile album
profile mifts
These are for the different Profile pages when using the Profile Dynamic Boost. E.g. use the "profile mifts" marker to display something specific just when the Mifts page shows.
every minute
every 2 minutes
every 3 minutes
every 4 minutes
every 5 minutes
every 10 minutes
every 15 minutes
every 30 minutes
every hour
every 3 hours
every 6 hours
every 12 hours
every day
Use these time markers for placed dynamics. They are relative to Manyland Time (which is also universal time) starting at midnight, so EVERY 12 HOURS, for instance, means noon and midnight. EVERY 15 MINUTES would mean e.g. 12:00, 12:15, 12:30 and so on for every hour of the day. EVERY DAY equals midnight. Rarer time span markers overrule more frequent ones, so if you use say EVERY MINUTE as well as EVERY HOUR, then at a full hour only the latter is triggered.

Interactings listening to Dynamic activation

You can make an Interacting know if a "Starts on Touch" Dynamic is touched via the activates word. If your Dynamic is named say "Button", you can use either of these two methods:

someone activates button: Beep!

sees @button activates: Bling!

Interactings triggering a Dynamic

You can create a Dynamic that will show in the place of an Interacting that triggers it. For instance, the Interacting could be a static spinning wheel; once it's spun, it would call /SPINNING WHEEL (the name of the included Dynamic). For the Dynamic to also fully replace the Interacting during the time it runs, you can tick the Replaces attribute for it. You can use Interacting's Currently and Ends commands to check if the Dynamic is still running, and when it ended.

Comments

If you want to add private text that won't be active, wrap it in "/* ... */" or precede it with "//":

/* This is
a multi-line comment */

// This is a single-line comment

(Note "://" will be interpreted to be part of a URL, not a comment.)

Examples

A forward-playing 6-cells animation

0.0s: cell 1 show
0.5s: cell 1 hide, cell 2 show
1.0s: cell 2 hide, cell 3 show
1.5s: cell 3 hide, cell 4 show
2.0s: cell 4 hide, cell 5 show
2.5s: cell 5 hide, cell 6 show
3.0s: restart

A block hovering up and down

0s: cell 1 show
0-2s: cell 1 up 10
2-4s: cell 1 down 10
4s: restart

A traffic light

For this, we draw the black traffic light base in cell 1, the red light in cell 2, the orange light in cell 3, and the green light in cell 4.

0S: CELL 1 SHOW, CELL 2 SHOW
4S: CELL 3 SHOW
6S: CELL 2 HIDE, CELL 3 HIDE, CELL 4 SHOW
12S: CELL 4 HIDE, CELL 3 SHOW
13S: CELL 3 HIDE, CELL 2 SHOW
15S: RESTART

(Since 15 seconds is the limit in any case after which things will restart, the last line is not strictly needed.)

A smoking chimney

Here we draw the chimney in the first cell and the smoke in the second. The smoke puff will move up starting at second 3. We want it to show at full opacity until second 6, where it starts to fade out:

0S: CELLS SHOW, CELL 1 Z-INDEX 2, CELL 2 Z-INDEX 1
3-7S: CELL 2 UP 70
6-7S: CELL 2 HIDE
7S: RESTART

A lumberjack wielding an axe

Here someone holds an axe and chops off wood. A wood splinter is shown flying when the axe hits. The first cell is the base body facing left, the second cell is the left arm holding an axe up, and the third cell is the wood splinter particle:

0S: CELL 1 SHOW, CELL 2 SHOW, PIVOT 17 15
0.5-0.75S: CELL 2 ROTATE -90, CELL 1 RIGHT 2
0.75S: CELL 3 SHOW, ACCELERATE DOWN .02
0.75-1.5S: CELL 3 UP 20, LEFT 5, OPACITY .25, CELL 1 LEFT 2
1-1.5S: CELL 2 ROTATE 90
1.5S: RESTART

Creating a Spinning Wheel

Creating a Prize Machine

A Hammering Board

This is an Interacting carnival attraction where your goal is to hammer the nail down in one strike. Two different Dynamics are included, one for winning (where cell 2 goes down 5) and one for losing (where cell 2 just goes down 2). Cell 1 is the back of the table, cell 2 the nail, cell 4 the front of the table, and cell 5 a wood splinter. In addition a hammering Sound block is included.

0: CELLS SHOW, PLAY SOUND
0-.3: CELL 2 DOWN 5
0.1-2: CELL 4 SHOW, UP 20, ACCELERATE DOWN .02, ROTATE 200, RIGHT 10
3-4: CELL 2 UP 5
4: RESTART

This is the Interacting code. "Hammer Board" and "Hammer Board Lose" are the names of the included Dynamics:

TOUCHES HAMMER: /HAMMER BOARD LOSE

TOUCHES HAMMER AND IS [CHANCE 50]: {YAY!} /HAMMER BOARD

A Spotlight using the Shape command

Shapes are polygons with optional gradients. For instance, we can create a rotating spotlight-like effect by using:

0: CELL 1 SHOW, PIVOT 14.5 28.5, SHAPE 10 10  19 10  19 -90  10 -90, FILL 255 255 0 0.5, GRADIENT 0 0  0 -90  255 255 0 0
0-3: CELL 1 ROTATE 90
3-6: CELL 1 ROTATE -90
6: RESTART

Write "fill bright" instead of "fill" for an even more light-like overlay.

More...

Also check out the main introductory help and the Interactings help. Got a question which isn't answered here, or new ideas and feedback? Have a look here please.