Event Configuration
Texture Function
The texture function will replace the texture for the event. For more information about texture functions, see Texture Functions.
Elevation Function
Sets the elevation for the character. Characters with non-zero elevation will fly above the ground with the specified height.
elevation(n)
Z Function
Sets the character's z position to the specified value. Their z position will be locked at this value. Good for events that need to be at a specific height and don't need to move, such as wall decorations.
z(n)
Shape Function
The shape function will set the shape of the character. The shape determines how the character's mesh will be built and how it will behave.
- flat
- A plane that lies flat on the ground.
- cross
- An intersection of two verical planes.
- xcross
- Same as cross, but angled at 45deg. Essentially a shorthand for
shape(cross),rot(45)
- 8cross
- A combination of cross and xcross.
- sprite
-
A special shape that will always face the camera.
Takes a second parameter for dynamic offset.
- billboard
-
Formerly known as the "tree" shape, also named "board" and "cardboard".
A billboard will rotate to match the camera's yaw, but not its pitch. - wall
- The wall shape is a flat plane that stands straight up instead of lying on the ground. It's intended for creating wall decorations by using it alongside the rot function and offset functions.
Rotation Functions
There are four rotation functions, yaw, pitch, roll, and rot.
Rot is the simple rotation function, and is usually only used on its own, but when used with the others it is applied last.
Yaw rotates the character around the z axis, effectively turning it left and right.
Pitch rotates the character around the x axis, effectively turning it up and down.
Roll rotates the character around the y axis, effectively tilting it side to side.
yaw(n)
pitch(n)
roll(n)
rot(n)
Offset Functions
There are three offset functions, xoff, yoff, and zoff, which add an offset to the position in the respective dimension. There is also an offset function which can be used to set all three at once.
xoff(n)
yoff(n)
zoff(n)
offset(x,y,z)
Dynamic Offset
The DOff Function controls the character's "Dynamic Offset". Dynamic offset is the amount the character will be offset towards the camera. This is usually used for the sprite shape, but any shape can be given a dynamic offset with this function. The default dynamic offset for sprites is settable in the plugin parameters through the "Sprite Dynamic Offset" parameter.
If the value provided to this function includes the letter "p", the dynamic offset will be adjusted according to the camera's pitch. The offset will be zero when the camera pitch is parallel to the ground, and will be the full offset when the camera is looking straight down.
Examples:doff(0), doff(.45), doff(.45p)
Pos Function
Changes the character's starting position to the specified x, y, and z values. Note that this currently does nothing when set with the Configure Command, and only applies the position when the event is first created or when changes event pages.
pos(x,y,z)
If you only need to change the starting z position, use: pos(z:n)
Scale Function
Scales the character by the specified amount. The scale is a multiplier, so a scale of 1 will be the normal size, 2 will be twice as large, and 0.5 will be half as large.
Takes up to three arguments: x, y, and z.
If only one argument is provided, the character will be scaled uniformly in all dimensions.
If two arguments are provided, 3D shapes will have their x and y dimensions scaled by the first argument, and their z dimension scaled by the second argument,
while 2D shapes will simply be scaled by the two dimensions they possess (either x and y or x and z).
scale(x,y,z)
Bush Function
Whether the character should have the bush alpha texture applied to it when standing on a bush tile.
bush(true/false)
Shadow Function
Controls shadow settings for the character.
Parameters:size,dist|3d
Size is the size of the blob shadow (a mesh positioned under the character that uses the shadow texture). You can set this to zero to disable the blob shadow.
Dist is the max elevation that the blob shadow will be visible. The shadow will become smaller and more faded the further it is from the character.
The 3D parameter controls whether the character should cast dynamic shadows.
shadow(0)
will disable the blob shadow while keeping dynamic shadows, while shadow(3d:false)
will disable only the dynamic shadows. shadow(false)
will disable all shadows.
shadow(true), shadow(false), shadow(0), shadow(2,4), shadow(3d:false)
Glow Function
The glow parameter will add an emissive color to make the character glow.
It can take a number from 0 to 1 or a color.
Examples: glow(1), glow(red)
Examples:
glow(1,0), glow(red,1)
Alpha Function
The alpha parameter can be used to make the character partially transparent. Or, you can set alpha to 1 to turn on alpha blending.
Examples: alpha(0.5), alpha(1)
Highlight Function
Sets the highlight color for the character. Set this to black to disable.
To change other highlight settings, use the Set Command.
highlight(color)
Lamp Function
The Lamp function sets up a point light on the character and changes the properties of that light.
Parameters:
color,intensity,range|shadow
Color is the color of the light, intensity is the brightness of the light, and range is the distance the light will reach.
lamp(white,1,5)
lamp(white,1,5|shadow:true)
The LampOffset function sets the position of the lamp relative to the character.
lampoffset(x, y, z)
Example: lampoffset(z:1.5)
Flashlight Function
The Flashlight function sets up a spotlight on the character and changes the properties of that light.
Parameters:
color,intensity,range,angle|dir:yaw,pitch|shadow
Angle is the angle of the light cone.
Yaw and Pitch are the direction the light is pointing. If absent the light will face the same direction as the character.
Yaw can be a relative value by prefixing it with +.
Shadow controls whether the light will create dynamic shadows.
flashlight(white,1,5,45)
flashlight(white,1,5,45|pitch:12)
flashlight(white,1,5,45|+90,0)
flashlight(white,1,5,45|shadow:true)
There are also FlashlightYaw and FlashlightPitch functions that set just the yaw and pitch values.
flashlightyaw(+90), flashlightpitch(12)
The FlashlightOffset function sets the position of the lamp relative to the character.
flashlightoffset(x, y, z)
Example: flashlightoffset(z:1.5)
The LightOffset function sets the lamp offset and flashlight offset at the same time.
lightoffset(x, y, z)
DirFix Function
If set to true, the dirfix function will prevent the character sprite's from changing direction based on the camera angle.
Gravity Function
The gravity function will set the fall speed of the event.
Example: gravity(10)
Platform Function
Controls whether other characters can walk on top of the character.
platform(true/false)
Collide Function
Sets the character's collision height.
If set to true, automatically determines the collision height.
If set to false, it will behave the same as collide(0),platform(false)
.
Example: collide(1.5), collide(true), collide(false)
Trigger Function
Sets the range of heights the event can be triggered from.
Parameters:up,down
By default, up is the same as the collision height and down is zero.
Example: trigger(2,0)
Pass Function
Alters the passability of the character. This is actually a shorthand function for the collide and platform functions.
pass(o)
sets platform(true)
, and if collide isn't set to a number it sets collide(true)
.
pass(x)
sets platform(false)
and collide(true)
.
pass(*)
sets platform(false)
and collide(false)
.
Model Function
Imports a 3D model for the character.
For more information about importing 3D models into MZ3D, see Importing Models.
Mesh Function
Constructs a mesh for the character based on a mesh string.
For more information about mesh strings, see Mesh Building