# Talk:Event Instructions

The coordinates used are the map's absolute coordinates, not relative ones to where the camera currently is.

All entry fields can range from -32768 to 32767. Tiles are 28x28, and Camera motion is 4x more precise, so 112 = 1 Tile. 1h is 12 pixels high, so 48 = 1h, and regular units are 3h tall.

Battle-friendly.

• 1B Edit Name Edit Example Edit Description MapLight ― MapLight(+00000,+00000,+?????,+RRRED,+GREEN,+BBLUE,+TIMER) ― Controls the map's lighting, and has the ability to change the color of the light.

Battle-friendly.

If the unit cannot reach destination, it will only enter walking state and not move at all.

Units in events have 3 Jump regardless of equipped or innate abilities using this instruction, but {70} Jump ignores this limit.

WARNING: A unit cannot WalkTo into/over water! However, you can use {70} Jump to counter this problem, and it will work just as well.

When the game finds a block, it will start executing it and will also resume the event whatever there is after the block at the same time.

When the game finds a block, it will start executing it and will also resume the event whatever there is after the block at the same time.

• 2C Edit Name Edit Example Edit Description FaceUnit2 ― FaceUnit2(xFU,x00,xAU,xMT,xCL,xRS,xDL) ― A copy of {53} FaceUnit with one a certain value set to 0 instead of 1. Visually, there doesn't seem to be any difference with the other.

Makes unit(s) rotate to face a specified unit. The rotation direction is the shortest one (Clockwise as default).

(0,0,0) is black and (255,255,255) is white.

• 2F Edit Name Edit Example Edit Description BlockLoop ― BlockLoop(LPA,xVR,xDEST) ― This instruction allows looping a block until the defined variable reaches, or is set to 0. It has to be placed inside a block in order to work.

A block left running will prevent the event from ending!

(+127,-128,-128) is red and (+127,+127,+127) is white while (+000,+000,+000) returns the unit to its original color.

(-128,-128,-128) is black and (+127,+127,+127) is white while (+000,+000,+000) returns the map to its original color.

(255,255,255) is white while (000,000,000) is no coloration.

Not battle-friendly.

Not battle-friendly.

• 42 Edit Name Edit Example Edit Description EarthquakeEnd ― EarthquakeEnd() ― Stops an ongoing earthquake.
• 43 Edit Name Edit Example Edit Description CallFunction ― CallFunction(xFC) ― Can call various different functions to alter many different things in the game.
• 44 Edit Name Edit Example Edit Description Draw ― Draw(xID,x00) ― Draws a loaded unit that is currently not being displayed.
• 45 Edit Name Edit Example Edit Description AddUnit ― AddUnit(xID,x00,xDR) ― Adds a unit to the event that is not currently loaded.
• 46 Edit Name Edit Example Edit Description Erase ― Erase(xID,x00) ― Erase a unit whose sprite is currently being displayed. Unit can be re-drawn later.
• 47 Edit Name Edit Example Edit Description AddGhostUnit ― AddGhostUnit(xSP,x00,xID,XXX,YYY,xEL,xFD,xDR) ― Adds a fake unit on the map which can be mostly controlled like a regular unit, with some exceptions. In battle, the unit cannot take action or be targeted, and units will be able to walk through it. You can use any spritesheet you want, but be warned: Adding a new spritesheet will leave you with the impossibility of removing the spritesheet even if you remove the Ghost Unit.
• 48 Edit Name Edit Example Edit Description WaitAddUnit ― WaitAddUnit() ― Waits until a normal or ghost unit is loaded into the event before resuming.
• 49 Edit Name Edit Example Edit Description AddUnitStart ― AddUnitStart() ― Creates an independently running block inside the event to load one or many units in the game. Does not slow down the event in any way, but make sure to use {4B} WaitAddUnitEnd before using instructions on the new units.

There is no need to use {48} WaitAddUnit after each unit inside this block.

• 4A Edit Name Edit Example Edit Description AddUnitEnd ― AddUnitEnd() ― Creates an independently running block inside the event to load one or many units in the game. Does not slow down the event in any way, but make sure to use {4B} WaitAddUnitEnd before using instructions on the new units.

There is no need to use {48} WaitAddUnit after each unit inside this block.

Battle-friendly.

Moves Target Unit to specified coordinates relative to its starting position, ignoring the field and the units statistics such as Jump.

• 6F Edit Name Edit Example Edit Description WaitSpriteMove ― WaitSpriteMove(xID,x00) ― Wait for a unit to complete its custom movement before resuming.
• 70 Edit Name Edit Example Edit Description Jump ― Jump(xID,x00,DST,xDR) ― The given unit will jump up or down 1-4 tiles distance. It works perfectly for jumping down, but might look weird when trying to jump to tiles too height. Does not have an elevation parameter. If the height difference is very minimal, the unit will just walk instead.

If the target tile is off the map, the unit will freeze in its frame and slide off the screen.

Use this instruction for general multiplication.

Use this instruction for general multiplication.

Use this instruction for general division.

Use this instruction for general division.

Must be placed before {D2} ForwardTarget!

Must be placed before {D2} ForwardTarget!

Must be placed after {D0} JumpForwardIfNot/{D1} JumpForward!

Must be placed after {D5} BackTarget!

Must be placed before {D3} JumpBack!