Class: Game_Character
- Includes:
- EvalKiller, GameData::SystemTags
- Defined in:
- docs/4_Systems_003_Map_Engine.rb
Overview
Class that describe and manipulate a Character (Player/Events)
Direct Known Subclasses
Constant Summary collapse
- SurfTag =
SystemTags that trigger Surfing
[TPond, TSea, RapidsL, RapidsR, RapidsU, RapidsD]
- SurfLTag =
SystemTags that does not trigger leaving water
SurfTag + [BridgeUD, BridgeRL, RapidsL, RapidsR, RapidsU, RapidsD, AcroBikeRL, AcroBikeUD, WaterFall, JumpD, JumpL, JumpR, JumpU, TUnderWater, Whirlpool]
- SlideTags =
SystemTags that triggers “sliding” state
[TIce, RapidsL, RapidsR, RapidsU, RapidsD, RocketL, RocketU, RocketD, RocketR, RocketRL, RocketRU, RocketRD, RocketRR]
- SHADOW_DISABLED_UPDATE_VALUES =
Values that allows the shadow_disabled update in set_appearance
[false, true, nil]
- StairsTag =
Array of SystemTag that define stairs
[StairsL, StairsD, StairsU, StairsR]
- PARTICLES_METHODS =
Constant defining all the particle method to call
{TGrass => :particle_push_grass, TTallGrass => :particle_push_tall_grass, TSand => :particle_push_sand, TSnow => :particle_push_snow, TPond => :particle_push_pond, TWetSand => :particle_push_wetsand, Puddle => :particle_push_puddle, WaterFall => :particle_push_waterfall, Whirlpool => :particle_push_whirlpool}
- SAND_PARTICLE_NAME =
Constant telling the sand particle name to push (according to the direction)
{2 => :sand_d, 4 => :sand_l, 6 => :sand_r, 8 => :sand_u}
- SNOW_PARTICLE_NAME =
Constant telling the snow particle name to push (according to the direction)
{2 => :snow_d, 4 => :snow_l, 6 => :snow_r, 8 => :snow_u}
- WHIRLPOOL_PARTICLE_NAME =
Constant telling the Whirlpool particle name to push (according to the direction)
{2 => :whirlpool_d, 4 => :whirlpool_l, 6 => :whirlpool_r, 8 => :whirlpool_u}
- EMPTY_MOVE_ROUTE =
Move route that is empty and serve as a template for all the generate move route (by Path Finding)
RPG::MoveRoute.new
Constants included from GameData::SystemTags
GameData::SystemTags::AcroBike, GameData::SystemTags::AcroBikeRL, GameData::SystemTags::AcroBikeUD, GameData::SystemTags::BridgeRL, GameData::SystemTags::BridgeUD, GameData::SystemTags::CrackedSoil, GameData::SystemTags::DeepSwamp, GameData::SystemTags::Empty, GameData::SystemTags::HeadButt, GameData::SystemTags::Hole, GameData::SystemTags::JumpD, GameData::SystemTags::JumpL, GameData::SystemTags::JumpR, GameData::SystemTags::JumpU, GameData::SystemTags::MachBike, GameData::SystemTags::Puddle, GameData::SystemTags::RClimb, GameData::SystemTags::RapidsD, GameData::SystemTags::RapidsL, GameData::SystemTags::RapidsR, GameData::SystemTags::RapidsU, GameData::SystemTags::Road, GameData::SystemTags::RocketD, GameData::SystemTags::RocketL, GameData::SystemTags::RocketR, GameData::SystemTags::RocketRD, GameData::SystemTags::RocketRL, GameData::SystemTags::RocketRR, GameData::SystemTags::RocketRU, GameData::SystemTags::RocketU, GameData::SystemTags::SlopesL, GameData::SystemTags::SlopesR, GameData::SystemTags::StairsD, GameData::SystemTags::StairsL, GameData::SystemTags::StairsR, GameData::SystemTags::StairsU, GameData::SystemTags::StopSlide, GameData::SystemTags::SwampBorder, GameData::SystemTags::TCave, GameData::SystemTags::TGrass, GameData::SystemTags::TIce, GameData::SystemTags::TMount, GameData::SystemTags::TPond, GameData::SystemTags::TSand, GameData::SystemTags::TSea, GameData::SystemTags::TSnow, GameData::SystemTags::TTallGrass, GameData::SystemTags::TUnderWater, GameData::SystemTags::TWetSand, GameData::SystemTags::WaterFall, GameData::SystemTags::Whirlpool, GameData::SystemTags::ZTag
Instance Attribute Summary collapse
-
#__bridge
The bridge state.
-
#animation_id ⇒ Integer
ID of the animation to play on the character.
-
#blend_type ⇒ Integer
readonly
Blending of the event (0 is the only one that actually works).
-
#can_make_footprint ⇒ Boolean
Tell if the character can make footprint on the ground or not.
-
#character_hue ⇒ Intger
Must be 0.
-
#character_name ⇒ String
Name of the character graphic used to display the event.
-
#charset_animation ⇒ Hash?
Hash if a charset animation is setup, else nil.
-
#direction ⇒ Integer
Direction where the event is looking (2 = down, 6 = right, 4 = left, 8 = up).
-
#direction_fix ⇒ Boolean
readonly
If the direction is fixed.
-
#follower ⇒ Game_Character?
readonly
The follower.
-
#id ⇒ Integer
readonly
Id of the event in the map.
-
#in_swamp ⇒ Integer, false
If the character is in swamp tile and the power of the swamp tile.
-
#is_pokemon ⇒ Boolean
If the character is a Pokemon (affect the step anime).
-
#move_route
readonly
The current move route.
-
#move_route_forcing ⇒ Boolean
readonly
If the character is forced to move using a specific route.
-
#move_route_index
readonly
The current move route index.
-
#move_speed ⇒ Integer
Dynamic move_speed value of the Game_Character, return a different value than @move_speed.
-
#no_slide ⇒ Boolean
If the character is unaffected by sliding tags.
-
#offset_screen_x ⇒ Integer?
Offset x of the character on the screen.
-
#offset_screen_y ⇒ Integer?
Offset y of the character on the screen.
-
#offset_shadow_screen_x ⇒ Integer?
Offset x of the character on the screen.
-
#offset_shadow_screen_y ⇒ Integer?
Offset y of the character on the screen.
-
#opacity ⇒ Integer
Opacity of the event when it’s shown.
-
#particles_disabled ⇒ Boolean
If the particles are disabled for the Character.
-
#path ⇒ Array<RPG::MoveCommand>, ...
The current path.
-
#pattern ⇒ Integer
readonly
Current pattern of the character graphic shown.
-
#real_x ⇒ Integer
readonly
“real” X position of the event, usually x * 128.
-
#real_y ⇒ Integer
readonly
“real” Y position of the event, usually y * 128.
-
#reflection_enabled ⇒ Boolean
If the character has reflection.
-
#shadow_disabled ⇒ Boolean
If the shadow should be shown or not.
-
#sliding
The current sliding state.
-
#step_anime ⇒ Boolean
If the event has a patern animation while staying.
-
#surfing
writeonly
The current surfing state.
-
#through ⇒ Boolean
If the character is traversable and it can walk through any tiles.
-
#tile_id ⇒ Integer
readonly
ID of the tile shown as the event (0 = no tile).
-
#transparent ⇒ Boolean
If the event is invisible.
-
#x ⇒ Integer
X position of the event in the current map.
-
#y ⇒ Integer
Y position of the event in the current map.
-
#z ⇒ Integer
Z priority of the event.
Instance Method Summary collapse
-
#activated? ⇒ Boolean
Check if the character is activate.
-
#animate_from_charset(lines, duration, reverse: false, repeat: false, last_frame_delay: false, reset_at_end: false) ⇒ Boolean
Set the charset animation.
-
#bridge_down_check(z)
(also: #bridge_up_check)
Adjust the Character informations related to the brige when it moves down (or up).
-
#bridge_left_check(z)
(also: #bridge_right_check)
Adjust the Character informations related to the brige when it moves left (or right).
-
#bush_depth ⇒ Integer
bush_depth of the sprite of the character.
-
#cancel_charset_animation
Cancel the charset animation.
-
#check_event_trigger_touch(*args)
Define the function check_event_trigger_touch to prevent bugs.
-
#contact?(x, y, z) ⇒ Boolean
Check if it’s possible to have contact interaction with this Game_Character at certain coordinates.
-
#define_path(path)
Define the path from path_finding.
-
#detect_swamp
Detect if the event walks in a swamp or a deep swamp and change the Game_Character states.
-
#each_front_tiles(nb_steps) {|x, y, d| ... }
Iterate through each front tiles including current tile.
-
#each_front_tiles_rect(nb_steps, dist) {|x, y, d| ... }
Iterate through each front tiles including current tile.
-
#emotion(type, wait = 34, params = {})
Show an emotion to an event or the player.
-
#event_passable_check?(new_x, new_y, z, game_map) ⇒ Boolean
Check the passage related to events.
-
#find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil)
Request a path to the target and follow it as soon as it found.
-
#fishing_creek_amount ⇒ Integer
Count the number of impassable tiles around the fishing spot.
-
#fly_reset_attributes
Reset some attributes when using Fly.
-
#follower_check?(new_x, new_y, z) ⇒ Boolean
Check the passage related to events.
-
#follower_move
Move a follower.
-
#follower_sliding? ⇒ Boolean
Check if the follower slides.
-
#follower_tail ⇒ Game_Character, self
Return the tail of the following queue.
-
#force_move_route(move_route)
Force the character to adopt a move route and save the original one.
-
#front_name_check(name) ⇒ Boolean
(also: #front_name_detect)
Check a the #front_event has a specific name.
-
#front_system_tag ⇒ Integer
Return the SystemTag in the front of the Game_Character.
-
#front_system_tag_db_symbol ⇒ Symbol
Return the db_symbol of the front system tag.
-
#front_terrain_tag ⇒ Integer?
Terrain tag in front of the character.
-
#front_tile ⇒ Array(Integer, Integer)
Return tile position in front of the player.
-
#front_tile_event ⇒ Game_Event?
Return the event that stand in the front of the Player.
-
#front_tile_id ⇒ Integer, 0
Return the id of the #front_tile_event.
-
#increase_steps
Increase step prototype (sets @stop_count to 0).
-
#initialize ⇒ Game_Character
constructor
Default initializer.
-
#jump(x_plus, y_plus, follow_move = true) ⇒ Boolean
Make the Game_Character jump.
-
#jump_bridge_check(x_plus, y_plus)
Perform the bridge check for the jump operation.
-
#jumping? ⇒ Boolean
is the character jumping ?.
-
#lock
Make the character look the player during a dialog.
-
#lock? ⇒ Boolean
Is the character locked ? (looking to the player when it’s activated).
-
#look_this_event
Look directly to the current event.
-
#look_to(event_id)
Look directly to a specific event.
-
#movable? ⇒ Boolean
Is the character able to execute a move action.
-
#move_away_from_player
Move the Game_Character away from the player.
-
#move_backward
Move the Game_Character backward.
-
#move_down(turn_enabled = true)
Move Game_Character down.
-
#move_follower_to_character
Warp the follower to the event it follows.
-
#move_forward
Move the Game_Character forward.
-
#move_frequency=(value)
Set the move_frequency (and define the max_stop_count value).
-
#move_left(turn_enabled = true)
Move Game_Character left.
-
#move_lower_left
Move the Game_Character lower left.
-
#move_lower_right
Move the Game_Character lower right.
-
#move_random
Move the Game_Character to a random direction.
-
#move_random_within_systemtag(sys_tag_id)
Move the Game_Character to a random direction within a rectangular zone.
-
#move_random_within_zone(lx, rx, ty, dy)
Move the Game_Character to a random direction within a rectangular zone.
-
#move_right(turn_enabled = true)
Move Game_Character right.
-
#move_toward(tx, ty)
Move the entity toward a specific coordinate.
-
#move_toward_player
Move the Game_Character toward the player.
-
#move_type_path
Movement induced by the Path Finding.
-
#move_up(turn_enabled = true)
Move Game_Character up.
-
#move_upper_left
Move the Game_Character upper left.
-
#move_upper_right
Move the Game_Character upper right.
-
#movement_process_end(no_follower_move = false)
End of the movement process.
-
#moveto(x, y)
Warps the character on the Map to specific coordinates.
-
#moving? ⇒ Boolean
is the character moving ?.
-
#next_event_follower ⇒ Game_Event?
Rerturn the first follower that is a Game_Event in the queue.
-
#original_move_speed ⇒ Integer
Return the original move speed of the character.
-
#particle_push
Push a particle to the particle stack if possible.
-
#particle_push_grass
Push a grass particle.
-
#particle_push_pond
Push a pond particle.
-
#particle_push_puddle
Push a pond particle.
-
#particle_push_rockclimb
Push a RockClimb particle.
-
#particle_push_sand
Push a sand particle.
-
#particle_push_snow
Push a snow particle.
-
#particle_push_tall_grass
Push a tall grass particle.
-
#particle_push_waterfall
Push Waterfall Particle.
-
#particle_push_wetsand
Push a wet sand particle.
-
#particle_push_whirlpool
Push Whirlpool Particle.
-
#passable?(x, y, d, skip_event = false) ⇒ Boolean
Is the tile in front of the character passable ?.
-
#passable_bridge_check?(x, y, d, new_x, new_y, z, game_map, sys_tag) ⇒ Boolean
Check the bridge related passabilities.
-
#passage_surf_check?(sys_tag) ⇒ Boolean
Check the surf related passabilities.
-
#process_slope_y_modifier(y_modifier)
Process the slope y modifier.
-
#reset_follower
Reset the follower stack of the current entity.
-
#reset_follower_move
Remove the memorized moves of the follower.
-
#screen_x ⇒ Integer
Return the x position of the sprite on the screen.
-
#screen_y ⇒ Integer
Return the y position of the sprite on the screen.
-
#screen_z(_height = 0) ⇒ Integer
Return the z superiority of the sprite of the character.
-
#set_appearance(character_name, character_hue = 0)
Define the new appearance of the character.
-
#set_follower(follower)
Define the follower of the event.
-
#set_surfing
Set the Game_Character in the “surfing” mode (not able to walk on ground but able to walk on water).
-
#shadow_screen_x ⇒ Integer
Return the x position of the shadow of the character on the screen.
-
#shadow_screen_y ⇒ Integer
Return the y position of the shadow of the character on the screen.
-
#sliding? ⇒ Boolean
Check if the Game_Character slides.
-
#slope_check_left(write = true)
Update the slope values when moving to left.
-
#slope_check_right(write = true) ⇒ Integer
Update the slope values when moving to right, and return y slope modifier.
-
#stair_move_left ⇒ Boolean
Try to move the Game_Character on a stair to the left.
-
#stair_move_right ⇒ Boolean
Try to move the Game_Character on a stair to the right.
-
#stop_path
Stop following the path if there is one and clear the agent.
-
#straighten
Adjust the character position.
-
#surfing? ⇒ Boolean
Check if the Game_Character is in the “surfing” mode.
-
#system_tag ⇒ Integer
Return the SystemTag where the Game_Character stands.
-
#system_tag_db_symbol ⇒ Symbol
Return the db_symbol of the system tag.
-
#terrain_tag ⇒ Integer?
current terrain tag on which the character steps.
-
#turn_180
Turn 180°.
-
#turn_away_from_player
Turn away from the player.
-
#turn_down
Turn down unless direction fix.
-
#turn_left
Turn left unless direction fix.
-
#turn_left_90
Turn 90° to the left of the Game_Character.
-
#turn_random
Turn in a random direction.
-
#turn_right
Turn right unless direction fix.
-
#turn_right_90
Turn 90° to the right of the Game_Character.
-
#turn_right_or_left_90
Turn random right or left 90°.
-
#turn_toward_character(character)
Turn toward another character.
-
#turn_toward_player
Turn toward the player.
-
#turn_up
Turn up unless direction fix.
-
#unlock
Release the character, can perform its natural movements.
-
#update
Update the Game_Character (manages movements and some animations).
-
#wait_charset_animation
Tell the Game_Character to wait for its charset animation to finish.
-
#z_bridge_check(sys_tag)
Check bridge information and adjust the z position of the Game_Character.
Methods included from GameData::SystemTags
Constructor Details
#initialize ⇒ Game_Character
Default initializer
1982 1983 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1982 def initialize end |
Instance Attribute Details
#__bridge
The bridge state
2632 2633 2634 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2632 def __bridge @__bridge end |
#animation_id ⇒ Integer
Returns ID of the animation to play on the character.
1966 1967 1968 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1966 def animation_id @animation_id end |
#blend_type ⇒ Integer (readonly)
Returns blending of the event (0 is the only one that actually works).
2316 2317 2318 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2316 def blend_type @blend_type end |
#can_make_footprint ⇒ Boolean
Returns tell if the character can make footprint on the ground or not.
2390 2391 2392 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2390 def can_make_footprint @can_make_footprint end |
#character_hue ⇒ Intger
Returns must be 0.
2312 2313 2314 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2312 def character_hue @character_hue end |
#character_name ⇒ String
Returns name of the character graphic used to display the event.
2310 2311 2312 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2310 def character_name @character_name end |
#charset_animation ⇒ Hash?
Returns hash if a charset animation is setup, else nil.
2326 2327 2328 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2326 def charset_animation @charset_animation end |
#direction ⇒ Integer
Returns direction where the event is looking (2 = down, 6 = right, 4 = left, 8 = up).
1960 1961 1962 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1960 def direction @direction end |
#direction_fix ⇒ Boolean (readonly)
If the direction is fixed
1977 1978 1979 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1977 def direction_fix @direction_fix end |
#follower ⇒ Game_Character? (readonly)
Returns the follower.
1970 1971 1972 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1970 def follower @follower end |
#id ⇒ Integer (readonly)
Id of the event in the map
1948 1949 1950 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1948 def id @id end |
#in_swamp ⇒ Integer, false
Returns if the character is in swamp tile and the power of the swamp tile.
2386 2387 2388 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2386 def in_swamp @in_swamp end |
#is_pokemon ⇒ Boolean
Returns if the character is a Pokemon (affect the step anime).
2388 2389 2390 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2388 def is_pokemon @is_pokemon end |
#move_route (readonly)
The current move route
2628 2629 2630 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2628 def move_route @move_route end |
#move_route_forcing ⇒ Boolean (readonly)
Returns if the character is forced to move using a specific route.
1962 1963 1964 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1962 def move_route_forcing @move_route_forcing end |
#move_route_index (readonly)
The current move route index
2630 2631 2632 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2630 def move_route_index @move_route_index end |
#move_speed ⇒ Integer
Dynamic move_speed value of the Game_Character, return a different value than @move_speed
1968 1969 1970 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1968 def move_speed @move_speed end |
#no_slide ⇒ Boolean
Returns if the character is unaffected by sliding tags.
1972 1973 1974 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1972 def @no_slide end |
#offset_screen_x ⇒ Integer?
Returns offset x of the character on the screen.
2332 2333 2334 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2332 def offset_screen_x @offset_screen_x end |
#offset_screen_y ⇒ Integer?
Returns offset y of the character on the screen.
2328 2329 2330 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2328 def offset_screen_y @offset_screen_y end |
#offset_shadow_screen_x ⇒ Integer?
Returns offset x of the character on the screen.
2334 2335 2336 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2334 def offset_shadow_screen_x @offset_shadow_screen_x end |
#offset_shadow_screen_y ⇒ Integer?
Returns offset y of the character on the screen.
2330 2331 2332 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2330 def offset_shadow_screen_y @offset_shadow_screen_y end |
#opacity ⇒ Integer
Returns opacity of the event when it’s shown.
2314 2315 2316 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2314 def opacity @opacity end |
#particles_disabled ⇒ Boolean
Returns if the particles are disabled for the Character.
2577 2578 2579 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2577 def particles_disabled @particles_disabled end |
#path ⇒ Array<RPG::MoveCommand>, ...
The current path
2639 2640 2641 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2639 def path @path end |
#pattern ⇒ Integer (readonly)
Returns current pattern of the character graphic shown.
2318 2319 2320 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2318 def pattern @pattern end |
#real_x ⇒ Integer (readonly)
Returns “real” X position of the event, usually x * 128.
1956 1957 1958 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1956 def real_x @real_x end |
#real_y ⇒ Integer (readonly)
Returns “real” Y position of the event, usually y * 128.
1958 1959 1960 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1958 def real_y @real_y end |
#reflection_enabled ⇒ Boolean
If the character has reflection
1980 1981 1982 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1980 def reflection_enabled @reflection_enabled end |
#shadow_disabled ⇒ Boolean
Returns if the shadow should be shown or not.
2324 2325 2326 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2324 def shadow_disabled @shadow_disabled end |
#sliding
The current sliding state
1974 1975 1976 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1974 def sliding @sliding end |
#step_anime ⇒ Boolean
Returns if the event has a patern animation while staying.
2322 2323 2324 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2322 def step_anime @step_anime end |
#surfing=(value) (writeonly)
The current surfing state
2636 2637 2638 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2636 def surfing=(value) @surfing = value end |
#through ⇒ Boolean
Returns if the character is traversable and it can walk through any tiles.
1964 1965 1966 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1964 def through @through end |
#tile_id ⇒ Integer (readonly)
Returns ID of the tile shown as the event (0 = no tile).
2308 2309 2310 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2308 def tile_id @tile_id end |
#transparent ⇒ Boolean
Returns if the event is invisible.
2320 2321 2322 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2320 def transparent @transparent end |
#x ⇒ Integer
Returns X position of the event in the current map.
1950 1951 1952 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1950 def x @x end |
#y ⇒ Integer
Returns Y position of the event in the current map.
1952 1953 1954 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1952 def y @y end |
#z ⇒ Integer
Returns Z priority of the event.
1954 1955 1956 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1954 def z @z end |
Instance Method Details
#activated? ⇒ Boolean
Check if the character is activate. Useful to make difference between event without active page and others.
2038 2039 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2038 def activated? end |
#animate_from_charset(lines, duration, reverse: false, repeat: false, last_frame_delay: false, reset_at_end: false) ⇒ Boolean
Set the charset animation. It can be needed to set the event in direction fixed.
2354 2355 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2354 def animate_from_charset(lines, duration, reverse: false, repeat: false, last_frame_delay: false, reset_at_end: false) end |
#bridge_down_check(z) Also known as: bridge_up_check
Adjust the Character informations related to the brige when it moves down (or up)
2561 2562 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2561 def bridge_down_check(z) end |
#bridge_left_check(z) Also known as: bridge_right_check
Adjust the Character informations related to the brige when it moves left (or right)
2567 2568 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2567 def bridge_left_check(z) end |
#bush_depth ⇒ Integer
bush_depth of the sprite of the character
2344 2345 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2344 def bush_depth end |
#cancel_charset_animation
Cancel the charset animation
2357 2358 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2357 def cancel_charset_animation end |
#check_event_trigger_touch(*args)
Define the function check_event_trigger_touch to prevent bugs
2034 2035 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2034 def check_event_trigger_touch(*args) end |
#contact?(x, y, z) ⇒ Boolean
Check if it’s possible to have contact interaction with this Game_Character at certain coordinates
2551 2552 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2551 def contact?(x, y, z) end |
#define_path(path)
Define the path from path_finding
2660 2661 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2660 def define_path(path) end |
#detect_swamp
Detect if the event walks in a swamp or a deep swamp and change the Game_Character states.
2555 2556 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2555 def detect_swamp end |
#each_front_tiles(nb_steps) {|x, y, d| ... }
Iterate through each front tiles including current tile
2492 2493 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2492 def each_front_tiles(nb_steps) end |
#each_front_tiles_rect(nb_steps, dist) {|x, y, d| ... }
Iterate through each front tiles including current tile
2500 2501 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2500 def each_front_tiles_rect(nb_steps, dist) end |
#emotion(type, wait = 34, params = {})
Show an emotion to an event or the player
2582 2583 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2582 def emotion(type, wait = 34, params = {}) end |
#event_passable_check?(new_x, new_y, z, game_map) ⇒ Boolean
Check the passage related to events
2076 2077 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2076 def event_passable_check?(new_x, new_y, z, game_map) end |
#find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil)
Request a path to the target and follow it as soon as it found
2650 2651 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2650 def find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil) end |
#fishing_creek_amount ⇒ Integer
Count the number of impassable tiles around the fishing spot
2442 2443 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2442 def fishing_creek_amount end |
#fly_reset_attributes
Reset some attributes when using Fly
2090 2091 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2090 def fly_reset_attributes end |
#follower_check?(new_x, new_y, z) ⇒ Boolean
Check the passage related to events
2083 2084 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2083 def follower_check?(new_x, new_y, z) end |
#follower_move
Move a follower
2451 2452 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2451 def follower_move end |
#follower_sliding? ⇒ Boolean
Check if the follower slides
2460 2461 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2460 def follower_sliding? end |
#follower_tail ⇒ Game_Character, self
Return the tail of the following queue
2469 2470 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2469 def follower_tail end |
#force_move_route(move_route)
Force the character to adopt a move route and save the original one
1993 1994 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1993 def force_move_route(move_route) end |
#front_name_check(name) ⇒ Boolean Also known as: front_name_detect
Check a the #front_event has a specific name
2505 2506 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2505 def front_name_check(name) end |
#front_system_tag ⇒ Integer
Return the SystemTag in the front of the Game_Character
2516 2517 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2516 def front_system_tag end |
#front_system_tag_db_symbol ⇒ Symbol
Return the db_symbol of the front system tag
2524 2525 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2524 def front_system_tag_db_symbol end |
#front_terrain_tag ⇒ Integer?
Terrain tag in front of the character
2520 2521 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2520 def front_terrain_tag end |
#front_tile ⇒ Array(Integer, Integer)
Return tile position in front of the player
2481 2482 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2481 def front_tile end |
#front_tile_event ⇒ Game_Event?
Return the event that stand in the front of the Player
2485 2486 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2485 def front_tile_event end |
#front_tile_id ⇒ Integer, 0
Return the id of the #front_tile_event
2511 2512 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2511 def front_tile_id end |
#increase_steps
Increase step prototype (sets @stop_count to 0)
2171 2172 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2171 def increase_steps end |
#jump(x_plus, y_plus, follow_move = true) ⇒ Boolean
Make the Game_Character jump
2254 2255 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2254 def jump(x_plus, y_plus, follow_move = true) end |
#jump_bridge_check(x_plus, y_plus)
Perform the bridge check for the jump operation
2259 2260 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2259 def jump_bridge_check(x_plus, y_plus) end |
#jumping? ⇒ Boolean
is the character jumping ?
2397 2398 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2397 def jumping? end |
#lock
Make the character look the player during a dialog
2417 2418 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2417 def lock end |
#lock? ⇒ Boolean
in this state, the character is not able to perform automatic moveroute (rmxp conf)
Is the character locked ? (looking to the player when it’s activated)
2422 2423 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2422 def lock? end |
#look_this_event
Look directly to the current event
2532 2533 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2532 def look_this_event end |
#look_to(event_id)
Look directly to a specific event
2529 2530 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2529 def look_to(event_id) end |
#movable? ⇒ Boolean
Is the character able to execute a move action
2400 2401 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2400 def movable? end |
#move_away_from_player
Move the Game_Character away from the player
2238 2239 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2238 def move_away_from_player end |
#move_backward
Move the Game_Character backward
2247 2248 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2247 def move_backward end |
#move_down(turn_enabled = true)
Move Game_Character down
2179 2180 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2179 def move_down(turn_enabled = true) end |
#move_follower_to_character
Warp the follower to the event it follows
2455 2456 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2455 def move_follower_to_character end |
#move_forward
Move the Game_Character forward
2244 2245 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2244 def move_forward end |
#move_frequency=(value)
Set the move_frequency (and define the max_stop_count value)
1986 1987 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1986 def move_frequency=(value) end |
#move_left(turn_enabled = true)
Move Game_Character left
2183 2184 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2183 def move_left(turn_enabled = true) end |
#move_lower_left
Move the Game_Character lower left
2209 2210 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2209 def move_lower_left end |
#move_lower_right
Move the Game_Character lower right
2212 2213 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2212 def move_lower_right end |
#move_random
Move the Game_Character to a random direction
2221 2222 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2221 def move_random end |
#move_random_within_systemtag(sys_tag_id)
Move the Game_Character to a random direction within a rectangular zone
2232 2233 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2232 def move_random_within_systemtag(sys_tag_id) end |
#move_random_within_zone(lx, rx, ty, dy)
Move the Game_Character to a random direction within a rectangular zone
2228 2229 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2228 def move_random_within_zone(lx, rx, ty, dy) end |
#move_right(turn_enabled = true)
Move Game_Character right
2194 2195 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2194 def move_right(turn_enabled = true) end |
#move_toward(tx, ty)
Move the entity toward a specific coordinate
2241 2242 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2241 def move_toward(tx, ty) end |
#move_toward_player
Move the Game_Character toward the player
2235 2236 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2235 def move_toward_player end |
#move_type_path
Movement induced by the Path Finding
2656 2657 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2656 def move_type_path end |
#move_up(turn_enabled = true)
Move Game_Character up
2206 2207 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2206 def move_up(turn_enabled = true) end |
#move_upper_left
Move the Game_Character upper left
2215 2216 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2215 def move_upper_left end |
#move_upper_right
Move the Game_Character upper right
2218 2219 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2218 def move_upper_right end |
#movement_process_end(no_follower_move = false)
End of the movement process
2266 2267 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2266 def movement_process_end(no_follower_move = false) end |
#moveto(x, y)
Warps the character on the Map to specific coordinates. Adjust the z position of the character.
1999 2000 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1999 def moveto(x, y) end |
#moving? ⇒ Boolean
is the character moving ?
2393 2394 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2393 def moving? end |
#next_event_follower ⇒ Game_Event?
Rerturn the first follower that is a Game_Event in the queue
2473 2474 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2473 def next_event_follower end |
#original_move_speed ⇒ Integer
Return the original move speed of the character
2543 2544 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2543 def original_move_speed end |
#particle_push
Push a particle to the particle stack if possible
2588 2589 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2588 def particle_push end |
#particle_push_grass
Push a grass particle
2591 2592 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2591 def particle_push_grass end |
#particle_push_pond
Push a pond particle
2610 2611 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2610 def particle_push_pond end |
#particle_push_puddle
Push a pond particle
2613 2614 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2613 def particle_push_puddle end |
#particle_push_rockclimb
Push a RockClimb particle
2616 2617 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2616 def particle_push_rockclimb end |
#particle_push_sand
Push a sand particle
2599 2600 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2599 def particle_push_sand end |
#particle_push_snow
Push a snow particle
2607 2608 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2607 def particle_push_snow end |
#particle_push_tall_grass
Push a tall grass particle
2594 2595 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2594 def particle_push_tall_grass end |
#particle_push_waterfall
Push Waterfall Particle
2619 2620 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2619 def particle_push_waterfall end |
#particle_push_wetsand
Push a wet sand particle
2602 2603 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2602 def particle_push_wetsand end |
#particle_push_whirlpool
Push Whirlpool Particle
2624 2625 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2624 def particle_push_whirlpool end |
#passable?(x, y, d, skip_event = false) ⇒ Boolean
Is the tile in front of the character passable ?
2051 2052 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2051 def passable?(x, y, d, skip_event = false) end |
#passable_bridge_check?(x, y, d, new_x, new_y, z, game_map, sys_tag) ⇒ Boolean
Check the bridge related passabilities
2063 2064 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2063 def passable_bridge_check?(x, y, d, new_x, new_y, z, game_map, sys_tag) end |
#passage_surf_check?(sys_tag) ⇒ Boolean
Check the surf related passabilities
2068 2069 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2068 def passage_surf_check?(sys_tag) end |
#process_slope_y_modifier(y_modifier)
Process the slope y modifier
2174 2175 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2174 def process_slope_y_modifier(y_modifier) end |
#reset_follower
Reset the follower stack of the current entity
2476 2477 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2476 def reset_follower end |
#reset_follower_move
Remove the memorized moves of the follower
2447 2448 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2447 def reset_follower_move end |
#screen_x ⇒ Integer
Return the x position of the sprite on the screen
2014 2015 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2014 def screen_x end |
#screen_y ⇒ Integer
Return the y position of the sprite on the screen
2018 2019 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2018 def screen_y end |
#screen_z(_height = 0) ⇒ Integer
Return the z superiority of the sprite of the character
2031 2032 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2031 def screen_z(_height = 0) end |
#set_appearance(character_name, character_hue = 0)
Define the new appearance of the character
2340 2341 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2340 def set_appearance(character_name, character_hue = 0) end |
#set_follower(follower)
Define the follower of the event
2465 2466 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2465 def set_follower(follower) end |
#set_surfing
Set the Game_Character in the “surfing” mode (not able to walk on ground but able to walk on water)
2404 2405 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2404 def set_surfing end |
#shadow_screen_x ⇒ Integer
Return the x position of the shadow of the character on the screen
2022 2023 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2022 def shadow_screen_x end |
#shadow_screen_y ⇒ Integer
Return the y position of the shadow of the character on the screen
2026 2027 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2026 def shadow_screen_y end |
#sliding? ⇒ Boolean
Check if the Game_Character slides
2414 2415 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2414 def sliding? end |
#slope_check_left(write = true)
Update the slope values when moving to left
2190 2191 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2190 def slope_check_left(write = true) end |
#slope_check_right(write = true) ⇒ Integer
Update the slope values when moving to right, and return y slope modifier
2202 2203 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2202 def slope_check_right(write = true) end |
#stair_move_left ⇒ Boolean
Try to move the Game_Character on a stair to the left
2187 2188 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2187 def stair_move_left end |
#stair_move_right ⇒ Boolean
Try to move the Game_Character on a stair to the right
2198 2199 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2198 def stair_move_right end |
#stop_path
Stop following the path if there is one and clear the agent
2653 2654 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2653 def stop_path end |
#straighten
Adjust the character position
1989 1990 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 1989 def straighten end |
#surfing? ⇒ Boolean
Check if the Game_Character is in the “surfing” mode
2409 2410 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2409 def surfing? end |
#system_tag ⇒ Integer
Return the SystemTag where the Game_Character stands
2434 2435 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2434 def system_tag end |
#system_tag_db_symbol ⇒ Symbol
Return the db_symbol of the system tag
2438 2439 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2438 def system_tag_db_symbol end |
#terrain_tag ⇒ Integer?
current terrain tag on which the character steps
2429 2430 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2429 def terrain_tag end |
#turn_180
Turn 180°
2288 2289 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2288 def turn_180 end |
#turn_away_from_player
Turn away from the player
2304 2305 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2304 def turn_away_from_player end |
#turn_down
Turn down unless direction fix
2270 2271 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2270 def turn_down end |
#turn_left
Turn left unless direction fix
2273 2274 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2273 def turn_left end |
#turn_left_90
Turn 90° to the left of the Game_Character
2285 2286 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2285 def turn_left_90 end |
#turn_random
Turn in a random direction
2294 2295 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2294 def turn_random end |
#turn_right
Turn right unless direction fix
2276 2277 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2276 def turn_right end |
#turn_right_90
Turn 90° to the right of the Game_Character
2282 2283 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2282 def turn_right_90 end |
#turn_right_or_left_90
Turn random right or left 90°
2291 2292 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2291 def turn_right_or_left_90 end |
#turn_toward_character(character)
Turn toward another character
2301 2302 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2301 def turn_toward_character(character) end |
#turn_toward_player
Turn toward the player
2297 2298 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2297 def turn_toward_player end |
#turn_up
Turn up unless direction fix
2279 2280 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2279 def turn_up end |
#unlock
Release the character, can perform its natural movements
2425 2426 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2425 def unlock end |
#update
Update the Game_Character (manages movements and some animations)
2087 2088 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2087 def update end |
#wait_charset_animation
Tell the Game_Character to wait for its charset animation to finish
2360 2361 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2360 def wait_charset_animation end |
#z_bridge_check(sys_tag)
Check bridge information and adjust the z position of the Game_Character
2573 2574 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 2573 def z_bridge_check(sys_tag) end |