The game object class for the player. It contains event starting determinants and map scrolling functions.
Extends
Methods
advanceMoveRouteIndex()inherited
- Advances the move route index
animationWait()numberinherited
- Get the wait between animation frames
Returns:
Type Description number Amount to wait between animation frames - Check if followers are gathered
Name Type Description True
boolean if gathered - Check if player followers are gathering
Name Type Description True
boolean if gathering blendMode()numberinherited
- Get the blend mode of the character
Returns:
Type Description number The character's blend mode bushDepth()numberinherited
- Get the character's bush depth
Returns:
Type Description number The character's bush depth - Check if the player can encounter enemies
Returns:
Type Description boolean True if can encounter - Check if the player can move
Returns:
Type Description boolean True if the player can move canPass(x, y, d)booleaninherited
- Check if the character can pass a tile in front of them given x/y coordinates and direction
Name Type Description x
number The x coordinate at the start of the move y
number The y coordinate at the start of the move d
number The direction of the move Returns:
Type Description boolean True if can pass canPassDiagonally(x, y, horz, vert)booleaninherited
- Check if the character can diagonally pass a tile in front of them given x/y coordinates and horizontal/vertical direction
Name Type Description x
number The x coordinate at the start of the move y
number The y coordinate at the start of the move horz
number The horizontal direction of the move vert
number The vertical direction of the move Returns:
Type Description boolean True if can pass - Check if local events can start
Returns:
Type Description boolean True if local events can start - Center on the given position
Name Type Description x
number The x position to center on y
number The y position to center on Returns:
Type Description undefined Undefined is returned - Get the center x coordinate
Returns:
Type Description number Center x coordinate - Get the center y coordinate
Returns:
Type Description number Center y coordinate characterIndex()numberinherited
- Get the character's index (for character sheet image)
Returns:
Type Description number The character index characterName()stringinherited
- Get the character's name (for character sheet image)
Returns:
Type Description string The character name - Check event triggers on the player's location
Name Type Description triggers
Array.<number> The triggers to check for - Check event triggers one tile in front of the player
Name Type Description triggers
Array.<number> The triggers to check for checkEventTriggerTouch(x, y)overrides
- Check event triggers for touch
Name Type Description x
number The x coordinate to check y
number The y coordinate to check checkEventTriggerTouchFront(d)inherited
- Check for event trigger touch (in front of character)
Name Type Description d
number The character's direction checkStop(threshold)booleaninherited
- Check if the character should stop
Name Type Description threshold
number The threshold after which the character should stop Returns:
Type Description boolean True if should stop - Clear player transfer data
copyPosition(character)inherited
- Copies the position of another character
Name Type Description character
Game_Character The character to copy position from deltaXFrom(x)numberinherited
- Get the delta x from the given x and the character x
Name Type Description x
number The given x Returns:
Type Description number The delta x deltaYFrom(y)numberinherited
- Get the delta y from the given y and the character y
Name Type Description y
number The given y Returns:
Type Description number The delta y direction()numberinherited
- Get the direction of the character
Returns:
Type Description number The character direction distancePerFrame()numberinherited
- Get the distance moved per frame
Returns:
Type Description number The distance moved per frame - Get the encounter progress value
Returns:
Type Description number The encounter progress amount endAnimation()inherited
- End the animation
endBalloon()inherited
- End the balloon animation
- Start an encounter
Returns:
Type Description boolean True if encounter succeeded - Move the player
Name Type Description direction
number The direction to move - Get the fade type of a transfer
Returns:
Type Description number The fade type findDirectionTo(goalX, goalY)numberinherited
- Find the direction to a given x/y coordinate
Name Type Description goalX
number The goal x coordinate goalY
number The goal y coordinate Returns:
Type Description number The direction to the goal coordinates followers()Game_Followers
- Get the player's followers
Returns:
Type Description Game_Followers The game followers object - Force the player to move forward
forceMoveRoute(moveRoute)inherited
- Forces a move route
Name Type Description moveRoute
Object The move route to force - Gather player followers
- Get the direction of input
Returns:
Type Description number The direction of input - Processing for getting off a vehicle
Name Type Description True
boolean if get off started - Processing for getting on or off a vehicle
Name Type Description True
boolean if get on/off started - Processing for getting on a vehicle
Name Type Description True
boolean if get on started hasStepAnime()booleaninherited
- Check if the character has a step animation
Returns:
Type Description boolean True if has step animation hasWalkAnime()booleaninherited
- Check if the character has a walk animation
Returns:
Type Description boolean True if has walk animation - Hide player followers
- Increase the character's steps
- Initialize character variables
- Initialize the character
isAnimationPlaying()booleaninherited
- Check if the animation is playing
Returns:
Type Description boolean True if animation playing isBalloonPlaying()booleaninherited
- Check if the character balloon animation is playing
Returns:
Type Description boolean True if balloon animation playing - Check if the player is collided with
Name Type Description x
number The x coordinate to check for collision y
number The y coordinate to check for collision Returns:
Type Description boolean True if collided isCollidedWithCharacters(x, y)booleaninherited
- Check if the character collided with other characters
Name Type Description x
number The x coordinate to check y
number The y coordinate to check Returns:
Type Description boolean True if collided isCollidedWithEvents(x, y)booleaninherited
- Check if the character collided with event characters
Name Type Description x
number The x coordinate to check y
number The y coordinate to check Returns:
Type Description boolean True if collided isCollidedWithVehicles(x, y)booleaninherited
- Check if the character collided with vehicle characters
Name Type Description x
number The x coordinate to check y
number The y coordinate to check Returns:
Type Description boolean True if collided - Check if dash button is being pressed
Returns:
Type Description boolean True if dash button is pressed isDashing()booleanoverrides
- Check if the player is dashing
Returns:
Type Description boolean True if dashing isDebugThrough()booleanoverrides
- Check if the player is through as a result of debug inputs
Returns:
Type Description boolean True if in debug through mode isDirectionFixed()booleaninherited
- Check if the character has a fixed direction
Returns:
Type Description boolean True if has fixed direction - Check if the player is in the airship
Returns:
Type Description boolean True if in airship - Check if the player is in the boat
Returns:
Type Description boolean True if in boat - Check if the player is in the ship
Returns:
Type Description boolean True if in ship - Check if the player is in any vehicle
Returns:
Type Description boolean True if in vehicle isJumping()booleaninherited
- Check if the character is jumping
Returns:
Type Description boolean True if jumping - Check if the map is passable between two tiles
Name Type Description x
number The x coordinate at the start of the move y
number The y coordinate at the start of the move d
number The direction of the move Returns:
Type Description boolean True if map is passable isMoveRouteForcing()booleaninherited
- Check if move route is forcing
Returns:
Type Description boolean True if forcing isMovementSucceeded()booleaninherited
- Check for movement success
Returns:
Type Description boolean True if movement succeeded isMoving()booleaninherited
- Check if the character is moving
Returns:
Type Description boolean True if moving isNearTheScreen()booleaninherited
- Check if the character is near the screen
Returns:
Type Description boolean True if near the screen - Check if the player is normal
Returns:
Type Description boolean True if normal isNormalPriority()booleaninherited
- Check if the character is normal priority
Returns:
Type Description boolean True if normal priority isObjectCharacter()booleaninherited
- Check if the character is an object character
Returns:
Type Description boolean True if object character isOnBush()booleaninherited
- Check if the character is on a bush
Returns:
Type Description boolean True if on bush tile - Check if the player is on a damage floor
Name Type Description True
boolean if on damage floor isOnLadder()booleaninherited
- Check if the character is on a ladder
Returns:
Type Description boolean True if on ladder isOriginalPattern()booleaninherited
- Check if the pattern is in the original state
Returns:
Type Description boolean True if in original state - Check if the character is stopping
Returns:
Type Description boolean True if stopping isThrough()booleaninherited
- Check if the character is through
Returns:
Type Description boolean True if through isTile()booleaninherited
- Check if the character is a tile
Returns:
Type Description boolean True if tile - Check if the player is transferring
Returns:
Type Description boolean True if transferring isTransparent()booleaninherited
- Check if the character is transparent
Returns:
Type Description boolean True if transparent - Jumps the character
Name Type Description xPlus
number Amount to jump in the x direction yPlus
number Amount to jump in the y direction jumpHeight()numberinherited
- Get the character's jump height
Returns:
Type Description number The character's jump height - Locates the character to the given coordinates
Name Type Description x
number The new x coordinate y
number The new y coordinate - Make the encounter count for the player
- Get a troop id to encounter
Returns:
Type Description number The troop id to encounter maxPattern()numberinherited
- Get the maximum pattern for animation
Returns:
Type Description number The maximum pattern for animation - Check if an encounter meets conditions
Name Type Description encounter
Object The encounter object to check Returns:
Type Description boolean True if conditions are met memorizeMoveRoute()inherited
- Memorizes the character move route
moveAwayFromCharacter(character)inherited
- Moves away from the given character
Name Type Description character
Game_Character The character to move away from moveAwayFromPlayer()inherited
- Moves away from the player
moveBackward()inherited
- Moves backward
- Move the player with input
- Moves diagonally in the given directions
Name Type Description horz
number The horizontal direction to move in vert
number The vertical direction to move in moveForward()inherited
- Moves forward
moveFrequency()numberinherited
- Get the move frequency of the character
Returns:
Type Description number The character's movement frequency moveRandom()inherited
- Random move handling
moveSpeed()numberinherited
- Get the move speed of the character
Returns:
Type Description number The character's movement speed - Moves straight in the given direction
Name Type Description d
number The direction to move in moveTowardCharacter(character)inherited
- Moves toward the given character
Name Type Description character
Game_Character The character to move toward moveTowardPlayer()inherited
- Moves toward the player
- Get the new map id of a transfer
Returns:
Type Description number The new map id opacity()numberinherited
- Get the opacity of the character
Returns:
Type Description number The character's opacity pattern()numberinherited
- Get the current animation pattern
Returns:
Type Description number The current animation pattern - Processing when the transfer occurs
pos(x, y)booleaninherited
- Check if the character's position is equal to the passed coordinates
Name Type Description x
number The x coordinate to check y
number The y coordinate to check Returns:
Type Description boolean True if coordinates match posNt(x, y)booleaninherited
- Check if the character's position is equal to the passed coordinates, and it's (n)ot (t)hrough
Name Type Description x
number The x coordinate to check y
number The y coordinate to check Returns:
Type Description boolean True if coordinates match and the character is not through processMoveCommand(command)inherited
- Processes a given move command
Name Type Description command
Object The move command processRouteEnd()inherited
- Processing when move route ends
realMoveSpeed()numberinherited
- Get the real movement speed for the character (factor in dashing or other effects)
Returns:
Type Description number The actual move speed of the character - Refresh the player
refreshBushDepth()inherited
- Refresh the character for bush depth change
regionId()numberinherited
- Get the region id the character is on
Returns:
Type Description number The region id - Request the map to reload
- Reserve a transfer
Name Type Description mapId
number The map id to transfer to x
number The x coordinate to transfer to y
number The y coordinate to transfer to d
number The direction to face after transfer fadeType
number The type of fade for the transfer resetPattern()inherited
- Resets the animation pattern
resetStopCount()inherited
- Resets the stop count
restoreMoveRoute()inherited
- Restores a memorized move route
reverseDir(d)inherited
- Reverse the character's direction
Name Type Description d
number The direction to reverse from screenX()numberinherited
- Get the character screen x value
Returns:
Type Description number The screen x value screenY()numberinherited
- Get the character screen y value
Returns:
Type Description number The screen y value screenZ()numberinherited
- Get the character screen z value
Returns:
Type Description number The screen z value scrolledX()numberinherited
- Get the character scrolled x value
Returns:
Type Description number The scrolled x value scrolledY()numberinherited
- Get the character scrolled y value
Returns:
Type Description number The scrolled y value searchLimit()numberinherited
- The maximum amount of tiles to search for finding direction
Returns:
Type Description number The search limit setBlendMode(blendMode)inherited
- Set the blend mode of the character
Name Type Description blendMode
number The character's new blend mode setDirection(d)inherited
- Set the direction of the character
Name Type Description d
number The character's new direction setDirectionFix(directionFix)inherited
- Set the character direction fix flag
Name Type Description directionFix
boolean New direction fix flag setImage(characterName, characterIndex)inherited
- Set the character's image properties (character name and index)
Name Type Description characterName
string The new character name characterIndex
number The new character index setMoveFrequency(moveFrequency)inherited
- Set the move frequency of the character
Name Type Description moveFrequency
number The character's new movement frequency setMoveRoute(moveRoute)inherited
- Sets a move route
Name Type Description moveRoute
Object The move route to set setMoveSpeed(moveSpeed)inherited
- Set the move speed of the character
Name Type Description moveSpeed
number The character's new movement speed setMovementSuccess(success)inherited
- Set movement success
Name Type Description success
boolean Whether movement succeeded setOpacity(opacity)inherited
- Set the opacity of the character
Name Type Description opacity
number The character's new opacity setPattern(pattern)inherited
- Set the current animation pattern
Name Type Description pattern
number The new current animation pattern setPosition(x, y)inherited
- Sets the position of the character
Name Type Description x
number The new x coordinate y
number The new y coordinate setPriorityType(priorityType)inherited
- Set the priority type of the character
Name Type Description priorityType
number The character's new priority type setStepAnime(stepAnime)inherited
- Set the character step animation flag
Name Type Description stepAnime
boolean New step animation flag setThrough(through)inherited
- Set the character through flag
Name Type Description through
boolean New through flag setTileImage(tileId)inherited
- Set the character's image properties when it's a tile character
Name Type Description tileId
number The tile id to use for the image setTransparent(transparent)inherited
- Set the transparent flag
Name Type Description transparent
boolean New transparent flag setWalkAnime(walkAnime)inherited
- Set the character walk animation flag
Name Type Description walkAnime
boolean New walk animation flag - Set up when a new game is started
shiftY()numberinherited
- Get the amount to shift the character's y value
Returns:
Type Description number Amount to shift the y value by - Show player followers
startAnimation()inherited
- Start the animation
startBalloon()inherited
- Start the character balloon animation
- Start an event on the map
Name Type Description x
number The x coordinate of the event y
number The y coordinate of the event triggers
Array.<number> The event's triggers normal
boolean If the priority should be normal or not straighten()inherited
- Straighten the character
swap(character)inherited
- Swap location with the given character
Name Type Description character
Game_Character The character to swap with terrainTag()numberinherited
- Get the terrain tag the character is on
Returns:
Type Description number The terrain tag tileId()numberinherited
- Get the character's tile id
Returns:
Type Description number The character's tile id - Check if action is triggered
Returns:
Type Description boolean True if action is triggered - Check if button input triggered action
Returns:
Type Description boolean True if action is triggered - Check if touch triggered action
Returns:
Type Description boolean True if action is triggered - Check if touch action should trigger on the given coordinates
Name Type Description x1
number The x coordinate to check for trigger y1
number The y coordinate to check for trigger Returns:
Type Description boolean True if action is triggered - Check if touch action should trigger on the given coordinates
Name Type Description x2
number The x coordinate to check for trigger y2
number The y coordinate to check for trigger Returns:
Type Description boolean True if action is triggered - Check if touch action should trigger on the given coordinates
Name Type Description x2
number The x coordinate to check for trigger y2
number The y coordinate to check for trigger Returns:
Type Description boolean True if action is triggered turn180()inherited
- Turn 180 degrees (turn around)
turnAwayFromCharacter(character)inherited
- Turns away from the given character
Name Type Description character
Game_Character The character to turn away from turnAwayFromPlayer()inherited
- Turns away from the player
turnLeft90()inherited
- Turn left 90 degrees
turnRandom()inherited
- Turn in a random direction
turnRight90()inherited
- Turn right 90 degrees
turnRightOrLeft90()inherited
- Randomly turn right or left 90 degrees
turnTowardCharacter(character)inherited
- Turns toward the given character
Name Type Description character
Game_Character The character to turn toward turnTowardPlayer()inherited
- Turns toward the player
update(sceneActive)overrides
- Update the player
Name Type Description sceneActive
boolean If the scene is active updateAnimation()inherited
- Update the character's animation
updateAnimationCount()inherited
- Update the animation count
- Update dash
- Update the encounter count
updateJump()inherited
- Update the character's jump
updateMove()inherited
- Update the character's move
- Update when not moving
Name Type Description wasMoving
boolean If the player just stopped moving sceneActive
boolean If scene is active updatePattern()inherited
- Updates the animation pattern
updateRoutineMove()inherited
- Updates move route
- Update scroll
Name Type Description lastScrolledX
number The last scroll x position lastScrolledY
number The last scroll y position updateStop()inherited
- Update the character's stop
- Update player vehicle
- Update getting off a vehicle
- Update getting on a vehicle
vehicle()Game_Vehicle
- Get the vehicle the player is in
Returns:
Type Description Game_Vehicle The vehicle the player is in