Class in reactor_sprites.js

Spriteset_Base

31 public functions in 7 groups · show internal (_) functions

The main menu, drawn by Scenes and Windows.

Familiar territory. Spriteset_Base 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 11

initialize() Sets up a new instance.
loadSystemImages() Loads the system images.
createLowerLayer() Creates the lower layer.
createUpperLayer() Creates the upper layer.
createBaseSprite() Creates the base sprite.
createBaseFilters() Creates the base filters.
createPictures() Creates the pictures.
createTimer() Creates the timer.
createOverallFilters() Creates the overall filters.
createAnimation() Creates the animation.
makeTargetSprites() Makes the target sprites.

Getting Information 1

findTargetSprite() Finds the target sprite.

Checks (True / False) 4

isMVAnimation() Whether it is mv animation.
isScreenAnimation() Whether an animation is played across the screen rather than on a target.
isAnimationForEach() Whether it is animation for each.
isAnimationPlaying() Whether it is animation playing.

Actions 3

destroy() Destroy.
removeAnimation() Removes the animation.
removeAllAnimations() Removes the all animations.

Events, Commands & Input 1

processAnimationRequests() Handles the animation requests.

Updating & Drawing 5

update() Update.
updateBaseFilters() Updates the base filters each frame.
updateOverallFilters() Updates the overall filters each frame.
updatePosition() Updates the position each frame.
updateAnimations() Updates the animations each frame.

Other 6

pictureContainerRect() Picture container rect.
authoredAnimationZ() The layer an event asks its animations to play on, or null for the default.
lastAnimationSprite() Last animation sprite.
animationBaseDelay() Animation base delay.
animationNextDelay() Animation next delay.
animationShouldMirror() Animation should mirror.

Setup & Creation

initialize

method source
Spriteset_Base.prototype.initialize()

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

loadSystemImages

method source
Spriteset_Base.prototype.loadSystemImages()

Loads the system images. (Same as the RPG Maker MZ method of this name.)

createLowerLayer

method source
Spriteset_Base.prototype.createLowerLayer()

Creates the lower layer. (Same as the RPG Maker MZ method of this name.)

createUpperLayer

method source
Spriteset_Base.prototype.createUpperLayer()

Creates the upper layer. (Same as the RPG Maker MZ method of this name.)

createBaseSprite

method source
Spriteset_Base.prototype.createBaseSprite()

Creates the base sprite. (Same as the RPG Maker MZ method of this name.)

createBaseFilters

method source
Spriteset_Base.prototype.createBaseFilters()

Creates the base filters. (Same as the RPG Maker MZ method of this name.)

createPictures

method source
Spriteset_Base.prototype.createPictures()

Creates the pictures. (Same as the RPG Maker MZ method of this name.)

createTimer

method source
Spriteset_Base.prototype.createTimer()

Creates the timer. (Same as the RPG Maker MZ method of this name.)

createOverallFilters

method source
Spriteset_Base.prototype.createOverallFilters()

Creates the overall filters. (Same as the RPG Maker MZ method of this name.)

createAnimation

method source
Spriteset_Base.prototype.createAnimation(request)

Creates the animation. (Same as the RPG Maker MZ method of this name.)

makeTargetSprites

method source
Spriteset_Base.prototype.makeTargetSprites(targets)

Makes the target sprites. (Same as the RPG Maker MZ method of this name.)

Getting Information

findTargetSprite

method source
Spriteset_Base.prototype.findTargetSprite(/*target*/)

Finds the target sprite. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isMVAnimation

method source
Spriteset_Base.prototype.isMVAnimation(animation)

Whether it is mv animation. (Same as the RPG Maker MZ method of this name.)

isScreenAnimation

method source
Spriteset_Base.prototype.isScreenAnimation(animation)

Whether an animation is played across the screen rather than on a target.

Details

Whether an animation is played across the screen rather than on a target.

The author already said which. MZ's displayType is 2 for screen — 0 is each target, 1 the centre of them all — and MV says the same thing with position 3. Nothing here is inferred.

isAnimationForEach

method source
Spriteset_Base.prototype.isAnimationForEach(animation)

Whether it is animation for each. (Same as the RPG Maker MZ method of this name.)

isAnimationPlaying

method source
Spriteset_Base.prototype.isAnimationPlaying()

Whether it is animation playing. (Same as the RPG Maker MZ method of this name.)

Actions

destroy

method source
Spriteset_Base.prototype.destroy(options)

Destroy. (Same as the RPG Maker MZ method of this name.)

removeAnimation

method source
Spriteset_Base.prototype.removeAnimation(sprite)

Removes the animation. (Same as the RPG Maker MZ method of this name.)

removeAllAnimations

method source
Spriteset_Base.prototype.removeAllAnimations()

Removes the all animations. (Same as the RPG Maker MZ method of this name.)

Events, Commands & Input

processAnimationRequests

method source
Spriteset_Base.prototype.processAnimationRequests()

Handles the animation requests. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

update

method source
Spriteset_Base.prototype.update()

Update. (Same as the RPG Maker MZ method of this name.)

updateBaseFilters

method source
Spriteset_Base.prototype.updateBaseFilters()

Updates the base filters each frame. (Same as the RPG Maker MZ method of this name.)

updateOverallFilters

method source
Spriteset_Base.prototype.updateOverallFilters()

Updates the overall filters each frame. (Same as the RPG Maker MZ method of this name.)

updatePosition

method source
Spriteset_Base.prototype.updatePosition()

Updates the position each frame. (Same as the RPG Maker MZ method of this name.)

updateAnimations

method source
Spriteset_Base.prototype.updateAnimations()

Updates the animations each frame. (Same as the RPG Maker MZ method of this name.)

Other

pictureContainerRect

method source
Spriteset_Base.prototype.pictureContainerRect()

Picture container rect. (Same as the RPG Maker MZ method of this name.)

authoredAnimationZ

method source
Spriteset_Base.prototype.authoredAnimationZ(targets)

The layer an event asks its animations to play on, or null for the default.

Details

The layer an event asks its animations to play on, or null for the default.

<animation z: 6> an exact layer <animation over> where RPG Maker puts one, above everything

Read off the event, because that is the thing the animation is played on and the only thing that knows what it is. A map-wide setting cannot answer it: one room will hold a console whose glow belongs under the table top it is set into and a brazier whose flame belongs over everything, and both are right.

The first target that has asked wins. An animation played on several targets at once is one sprite on one layer, so there is a single answer to give, and taking the first stated one is at least predictable — where averaging or refusing would be neither.

Game_Player, followers and vehicles carry no note, so they never answer and never need to: an animation on the player is on the thing the camera is following, which is exactly the case the default already suits.

lastAnimationSprite

method source
Spriteset_Base.prototype.lastAnimationSprite()

Last animation sprite. (Same as the RPG Maker MZ method of this name.)

animationBaseDelay

method source
Spriteset_Base.prototype.animationBaseDelay()

Animation base delay. (Same as the RPG Maker MZ method of this name.)

animationNextDelay

method source
Spriteset_Base.prototype.animationNextDelay()

Animation next delay. (Same as the RPG Maker MZ method of this name.)

animationShouldMirror

method source
Spriteset_Base.prototype.animationShouldMirror(target)

Animation should mirror. (Same as the RPG Maker MZ method of this name.)