Familiar territory. Game_Character keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.
Quick Reference
Setup & Creation 2
| initialize() | Sets up a new instance. |
| initMembers() | Initializes the members. |
Getting Information 1
| findDirectionTo() | Finds the direction to. |
Checks (True / False) 1
| isMoveRouteForcing() | Whether it is move route forcing. |
Actions 18
| restoreMoveRoute() | Restores the move route. |
| setMoveRoute() | Sets the move route. |
| moveRandom() | Move random. |
| moveTowardCharacter() | Move toward character. |
| moveAwayFromCharacter() | Move away from character. |
| turnTowardCharacter() | Turn toward character. |
| turnAwayFromCharacter() | Turn away from character. |
| turnTowardPlayer() | Turn toward player. |
| turnAwayFromPlayer() | Turn away from player. |
| moveTowardPlayer() | Move toward player. |
| moveAwayFromPlayer() | Move away from player. |
| moveForward() | Move forward. |
| moveBackward() | Move backward. |
| turnRight90() | Turn right90. |
| turnLeft90() | Turn left90. |
| turnRightOrLeft90() | Turn right or left90. |
| turnRandom() | Turn random. |
| swap() | Swap. |
Events, Commands & Input 2
| processMoveCommand() | Handles the move command. |
| processRouteEnd() | Handles the route end. |
Updating & Drawing 2
| updateStop() | Updates the stop each frame. |
| updateRoutineMove() | Updates the routine move each frame. |
Other 26
| memorizeMoveRoute() | Memorize move route. |
| forceMoveRoute() | Force move route. |
| deltaXFrom() | Delta x from. |
| deltaYFrom() | Delta y from. |
| advanceMoveRouteIndex() | Advance move route index. |
| turn180() | Turn180. |
| searchLimit() | Search limit. |
| walkScratch() | The arrays every search uses, made once: a tile opened is a row in each. |
| reactorMoveToTile() | A route's Move to Tile step: the character walks to the tile by path finding and the route stays on this step… |
| reactorWalkTo() | The same walk from outside a route: a forced route of that one step, so the character's own route waits for i… |
| reactorTeleportTo() | A route's Teleport to Tile step: the character stands on the tile at once, no walk and no path needed, and th… |
| walkRoute() | The one-step route that walks to a tile (height and whole as reactorMoveToTile takes them). |
| reactorIsWalking() | Whether a walk to a tile is under way. |
| reactorWalkArrived() | Whether the character stands on the tile its walk is to, on the floor meant where one is named. |
| reactorWalkAllows() | Whether a walk may take the step from (x, y) toward d: the character's own step rule. |
| reactorWalkStep() | One step of a walk from tile (x, y), standing at height there (the level of a 3D map; 0 on a flat one): the h… |
| reactorWalkHeight() | The height a walk starts from: where the character stands on a 3D map (on a ladder, the height it holds), 0 o… |
| reactorUpdateWalk() | One frame of a walk to a tile, asked while the character stands: the next step of its path, or a slice of the… |
| reactorEndWalk() | Reactor end walk. |
| reactorSearchWalk() | The path to a tile, or null while it is still being looked for: one search runs at a time, a slice a frame, s… |
| reactorFindPath() | The path to a tile, found at once: { directions, length, reached, exhausted, opened }, to the nearest tile re… |
| reactorBeginSearch() | Reactor begin search. |
| walkLeft() | The steps left from a tile to the goal at least: on another floor than the one meant, further by a stair's wo… |
| walkKey() | A tile on a floor: two floors over one tile (a bridge and the road under it) are two places. |
| reactorRunSearch() | Opens up to budget tiles of a search, or as many as milliseconds allow (never fewer than WALK_SLICE_FEWEST). |
| reactorFinishSearch() | The steps from the start to the goal, or to the nearest tile reached where the goal was not. |
Setup & Creation
initialize
method sourceGame_Character.prototype.initialize()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
initMembers
method sourceGame_Character.prototype.initMembers()
Initializes the members. (Same as the RPG Maker MZ method of this name.)
Getting Information
findDirectionTo
method sourceGame_Character.prototype.findDirectionTo(goalX, goalY)
Finds the direction to. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isMoveRouteForcing
method sourceGame_Character.prototype.isMoveRouteForcing()
Whether it is move route forcing. (Same as the RPG Maker MZ method of this name.)
Actions
restoreMoveRoute
method sourceGame_Character.prototype.restoreMoveRoute()
Restores the move route. (Same as the RPG Maker MZ method of this name.)
setMoveRoute
method sourceGame_Character.prototype.setMoveRoute(moveRoute)
Sets the move route. (Same as the RPG Maker MZ method of this name.)
moveRandom
method sourceGame_Character.prototype.moveRandom()
Move random. (Same as the RPG Maker MZ method of this name.)
moveTowardCharacter
method sourceGame_Character.prototype.moveTowardCharacter(character)
Move toward character. (Same as the RPG Maker MZ method of this name.)
moveAwayFromCharacter
method sourceGame_Character.prototype.moveAwayFromCharacter(character)
Move away from character. (Same as the RPG Maker MZ method of this name.)
turnTowardCharacter
method sourceGame_Character.prototype.turnTowardCharacter(character)
Turn toward character. (Same as the RPG Maker MZ method of this name.)
turnAwayFromCharacter
method sourceGame_Character.prototype.turnAwayFromCharacter(character)
Turn away from character. (Same as the RPG Maker MZ method of this name.)
turnTowardPlayer
method sourceGame_Character.prototype.turnTowardPlayer()
Turn toward player. (Same as the RPG Maker MZ method of this name.)
turnAwayFromPlayer
method sourceGame_Character.prototype.turnAwayFromPlayer()
Turn away from player. (Same as the RPG Maker MZ method of this name.)
moveTowardPlayer
method sourceGame_Character.prototype.moveTowardPlayer()
Move toward player. (Same as the RPG Maker MZ method of this name.)
moveAwayFromPlayer
method sourceGame_Character.prototype.moveAwayFromPlayer()
Move away from player. (Same as the RPG Maker MZ method of this name.)
moveForward
method sourceGame_Character.prototype.moveForward()
Move forward. (Same as the RPG Maker MZ method of this name.)
moveBackward
method sourceGame_Character.prototype.moveBackward()
Move backward. (Same as the RPG Maker MZ method of this name.)
turnRight90
method sourceGame_Character.prototype.turnRight90()
Turn right90. (Same as the RPG Maker MZ method of this name.)
turnLeft90
method sourceGame_Character.prototype.turnLeft90()
Turn left90. (Same as the RPG Maker MZ method of this name.)
turnRightOrLeft90
method sourceGame_Character.prototype.turnRightOrLeft90()
Turn right or left90. (Same as the RPG Maker MZ method of this name.)
turnRandom
method sourceGame_Character.prototype.turnRandom()
Turn random. (Same as the RPG Maker MZ method of this name.)
swap
method sourceGame_Character.prototype.swap(character)
Swap. (Same as the RPG Maker MZ method of this name.)
Events, Commands & Input
processMoveCommand
method sourceGame_Character.prototype.processMoveCommand(command)
Handles the move command. (Same as the RPG Maker MZ method of this name.)
processRouteEnd
method sourceGame_Character.prototype.processRouteEnd()
Handles the route end. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
updateStop
method sourceGame_Character.prototype.updateStop()
Updates the stop each frame. (Same as the RPG Maker MZ method of this name.)
updateRoutineMove
method sourceGame_Character.prototype.updateRoutineMove()
Updates the routine move each frame. (Same as the RPG Maker MZ method of this name.)
Other
memorizeMoveRoute
method sourceGame_Character.prototype.memorizeMoveRoute()
Memorize move route. (Same as the RPG Maker MZ method of this name.)
forceMoveRoute
method sourceGame_Character.prototype.forceMoveRoute(moveRoute)
Force move route. (Same as the RPG Maker MZ method of this name.)
deltaXFrom
method sourceGame_Character.prototype.deltaXFrom(x)
Delta x from. (Same as the RPG Maker MZ method of this name.)
deltaYFrom
method sourceGame_Character.prototype.deltaYFrom(y)
Delta y from. (Same as the RPG Maker MZ method of this name.)
advanceMoveRouteIndex
method sourceGame_Character.prototype.advanceMoveRouteIndex()
Advance move route index. (Same as the RPG Maker MZ method of this name.)
turn180
method sourceGame_Character.prototype.turn180()
Turn180. (Same as the RPG Maker MZ method of this name.)
searchLimit
method sourceGame_Character.prototype.searchLimit()
Search limit. (Same as the RPG Maker MZ method of this name.)
walkScratch
static sourceGame_Character.walkScratch()
The arrays every search uses, made once: a tile opened is a row in each.
reactorMoveToTile
method sourceGame_Character.prototype.reactorMoveToTile(x, y, height, whole)
A route's Move to Tile step: the character walks to the tile by path finding and the route stays on this step until it stands there.
Details
A route's Move to Tile step: the character walks to the tile by path
finding and the route stays on this step until it stands there. Where the
tile cannot be reached it goes as near as it can; a route with Skip If
Cannot Move then goes on to its next step, and any other tries again at
intervals, as a blocked step does. A second call replaces the first.
height names the floor of a 3D map the tile is meant on (without it,
whichever floor of the tile is come to first); whole takes the whole way
or none: no walk to somewhere near (a number: nor a way of more steps
than that).
reactorWalkTo
method sourceGame_Character.prototype.reactorWalkTo(x, y, skippable = true)
The same walk from outside a route: a forced route of that one step, so the character's own route waits for it and isMoveRouteForcing says whether it is still on its way.
Details
The same walk from outside a route: a forced route of that one step, so
the character's own route waits for it and isMoveRouteForcing says
whether it is still on its way. skippable false keeps trying where the
tile cannot be reached.
reactorTeleportTo
method sourceGame_Character.prototype.reactorTeleportTo(x, y)
A route's Teleport to Tile step: the character stands on the tile at once, no walk and no path needed, and the route goes straight on.
Details
A route's Teleport to Tile step: the character stands on the tile at once, no walk and no path needed, and the route goes straight on. Any walk under way ends; the player's camera and followers come along (Game_Player.locate).
walkRoute
static sourceGame_Character.walkRoute(x, y, skippable = true, height, whole)
The one-step route that walks to a tile (height and whole as reactorMoveToTile takes them).
Details
The one-step route that walks to a tile (height and whole as reactorMoveToTile takes them).
reactorIsWalking
method sourceGame_Character.prototype.reactorIsWalking()
Whether a walk to a tile is under way.
reactorWalkArrived
method sourceGame_Character.prototype.reactorWalkArrived()
Whether the character stands on the tile its walk is to, on the floor meant where one is named.
reactorWalkAllows
method sourceGame_Character.prototype.reactorWalkAllows(x, y, d)
Whether a walk may take the step from (x, y) toward d: the character's own step rule.
reactorWalkStep
method sourceGame_Character.prototype.reactorWalkStep(x, y, d, height)
One step of a walk from tile (x, y), standing at height there (the level of a 3D map; 0 on a flat one): the height stood at on the next tile, or NaN where the step cannot be taken.
Details
One step of a walk from tile (x, y), standing at height there (the level
of a 3D map; 0 on a flat one): the height stood at on the next tile, or
NaN where the step cannot be taken. The character is asked as if it stood
on that tile at that height, so the slopes, ledges and floors of a 3D map
are judged by the rule its own steps are.
reactorWalkHeight
method sourceGame_Character.prototype.reactorWalkHeight()
The height a walk starts from: where the character stands on a 3D map (on a ladder, the height it holds), 0 on a flat one.
reactorUpdateWalk
method sourceGame_Character.prototype.reactorUpdateWalk()
One frame of a walk to a tile, asked while the character stands: the next step of its path, or a slice of the search for one.
Details
One frame of a walk to a tile, asked while the character stands: the next step of its path, or a slice of the search for one. True once the walk is over (the character stands on the tile, or cannot get nearer and its route skips what cannot be done), with the movement success set to whether it arrived.
reactorEndWalk
method sourceGame_Character.prototype.reactorEndWalk(arrived)
Reactor end walk. (Same as the RPG Maker MZ method of this name.)
reactorSearchWalk
method sourceGame_Character.prototype.reactorSearchWalk(goalX, goalY, goalHeight, limit)
The path to a tile, or null while it is still being looked for: one search runs at a time, a slice a frame, so a long way round never holds a frame.
reactorFindPath
method sourceGame_Character.prototype.reactorFindPath(goalX, goalY, goalHeight)
The path to a tile, found at once: { directions, length, reached, exhausted, opened }, to the nearest tile reached where reached is false.
Details
The path to a tile, found at once: { directions, length, reached,
exhausted, opened }, to the nearest tile reached where reached is
false. For scripts and tests; a walk searches in slices.
reactorBeginSearch
method sourceGame_Character.prototype.reactorBeginSearch(goalX, goalY, goalHeight, limit)
Reactor begin search. (Same as the RPG Maker MZ method of this name.)
walkLeft
static sourceGame_Character.walkLeft(x, y, height, goalX, goalY, goalHeight)
The steps left from a tile to the goal at least: on another floor than the one meant, further by a stair's worth.
walkKey
static sourceGame_Character.walkKey(x, y, height)
A tile on a floor: two floors over one tile (a bridge and the road under it) are two places.
reactorRunSearch
method sourceGame_Character.prototype.reactorRunSearch(search, budget, milliseconds)
Opens up to budget tiles of a search, or as many as milliseconds allow (never fewer than WALK_SLICE_FEWEST).
Details
Opens up to budget tiles of a search, or as many as milliseconds
allow (never fewer than WALK_SLICE_FEWEST). True once it is over:
search.path is then the way.
reactorFinishSearch
method sourceGame_Character.prototype.reactorFinishSearch(search)
The steps from the start to the goal, or to the nearest tile reached where the goal was not.