Class: Game_Event

Inherits:
Game_Character show all
Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview

Describe an Event during the Map display process

Constant Summary collapse

SURFING_TAG =

Tag inside an event that put it in the surfing state

'surf_'
INVISIBLE_EVENT_NAME =

If named like this, this event is an invisible object

'OBJ_INVISIBLE'
INVISIBLE_EVENT_TAG =

Tag that sets the event in an invisible state (not triggerd unless in front of it)

'invisible_'
AUTO_CHARSET_TAG =

Tag that tells the event to always take the character_name of the first page when page change

'$'
PARTICLE_OFF_TAG =

Tag that tells the event not to push particles when it moves

'[particle=off]'
OFFSET_Y_TAG =

Tag that detect offset_screen_y

/\[offset_y=([0-9\-]+)\]/
OFFSET_X_TAG =

Tag that detect offset_screen_x

/\[offset_x=([0-9\-]+)\]/
NO_SPRITE_TAG =

Tag that forbid the creation of a Sprite_Character for this event

'[sprite=off]'
SYMBOL_ALIAS_TAG =

Tag that give the event an symbol alias

/\[alias=([a-z\-0-9\-_]+)\]/
SET_Z_TAG =

Tag that detect z=

/\[z=([0-9\-]+)\]/
NOSLIDE_TAG =

Tag enabling no slide

'[noslide=on]'
REFLECTION_TAG =

Tag enabling reflection

'[reflection=on]'

Constants inherited from Game_Character

Game_Character::EMPTY_MOVE_ROUTE, Game_Character::PARTICLES_METHODS, Game_Character::SAND_PARTICLE_NAME, Game_Character::SHADOW_DISABLED_UPDATE_VALUES, Game_Character::SNOW_PARTICLE_NAME, Game_Character::SlideTags, Game_Character::StairsTag, Game_Character::SurfLTag, Game_Character::SurfTag, Game_Character::WHIRLPOOL_PARTICLE_NAME

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

Attributes inherited from Game_Character

#__bridge, #animation_id, #blend_type, #can_make_footprint, #character_hue, #character_name, #charset_animation, #direction, #direction_fix, #follower, #id, #in_swamp, #is_pokemon, #move_route, #move_route_forcing, #move_route_index, #move_speed, #no_slide, #offset_screen_x, #offset_screen_y, #offset_shadow_screen_x, #offset_shadow_screen_y, #opacity, #particles_disabled, #path, #pattern, #real_x, #real_y, #reflection_enabled, #shadow_disabled, #sliding, #step_anime, #surfing, #through, #tile_id, #transparent, #x, #y, #z

Instance Method Summary collapse

Methods inherited from Game_Character

#animate_from_charset, #bridge_down_check, #bridge_left_check, #bush_depth, #cancel_charset_animation, #contact?, #define_path, #detect_swamp, #each_front_tiles, #each_front_tiles_rect, #emotion, #event_passable_check?, #fishing_creek_amount, #fly_reset_attributes, #follower_check?, #follower_move, #follower_sliding?, #follower_tail, #force_move_route, #front_name_check, #front_system_tag, #front_system_tag_db_symbol, #front_terrain_tag, #front_tile, #front_tile_event, #front_tile_id, #increase_steps, #jump, #jump_bridge_check, #jumping?, #lock, #lock?, #look_this_event, #look_to, #movable?, #move_away_from_player, #move_backward, #move_down, #move_follower_to_character, #move_forward, #move_frequency=, #move_left, #move_lower_left, #move_lower_right, #move_random, #move_random_within_systemtag, #move_random_within_zone, #move_right, #move_toward, #move_toward_player, #move_type_path, #move_up, #move_upper_left, #move_upper_right, #movement_process_end, #moveto, #moving?, #next_event_follower, #original_move_speed, #particle_push, #particle_push_grass, #particle_push_pond, #particle_push_puddle, #particle_push_rockclimb, #particle_push_sand, #particle_push_snow, #particle_push_tall_grass, #particle_push_waterfall, #particle_push_wetsand, #particle_push_whirlpool, #passable?, #passable_bridge_check?, #passage_surf_check?, #process_slope_y_modifier, #reset_follower, #reset_follower_move, #screen_x, #screen_y, #screen_z, #set_appearance, #set_follower, #set_surfing, #shadow_screen_x, #shadow_screen_y, #sliding?, #slope_check_left, #slope_check_right, #stair_move_left, #stair_move_right, #stop_path, #straighten, #surfing?, #system_tag, #system_tag_db_symbol, #terrain_tag, #turn_180, #turn_away_from_player, #turn_down, #turn_left, #turn_left_90, #turn_random, #turn_right, #turn_right_90, #turn_right_or_left_90, #turn_toward_character, #turn_toward_player, #turn_up, #unlock, #wait_charset_animation, #z_bridge_check

Methods included from GameData::SystemTags

gen, system_tag_db_symbol

Constructor Details

#initialize(map_id, event) ⇒ Game_Event

Initialize the Game_Event with its map_id and its RPG::Event data

Parameters:

  • map_id (Integer)

    id of the map where the event is instanciated

  • event (RPG::Event)

    data of the event



2714
2715
# File 'docs/4_Systems_003_Map_Engine.rb', line 2714

def initialize(map_id, event)
end

Instance Attribute Details

#erasedBoolean (readonly)

Returns if the event was erased (needs to be removed from the view).

Returns:

  • (Boolean)

    if the event was erased (needs to be removed from the view)



2704
2705
2706
# File 'docs/4_Systems_003_Map_Engine.rb', line 2704

def erased
  @erased
end

#eventRPG::Event (readonly)

Returns the event data from the MAP.

Returns:



2700
2701
2702
# File 'docs/4_Systems_003_Map_Engine.rb', line 2700

def event
  @event
end

#invisible_eventBoolean (readonly)

Returns if the event is an invisible event (should be in front of the event to trigger it when it doesn’t have a character_name).

Returns:

  • (Boolean)

    if the event is an invisible event (should be in front of the event to trigger it when it doesn’t have a character_name)



2702
2703
2704
# File 'docs/4_Systems_003_Map_Engine.rb', line 2702

def invisible_event
  @invisible_event
end

#listArray<RPG::EventCommand> (readonly)

Returns list of commands that should be executed.

Returns:



2696
2697
2698
# File 'docs/4_Systems_003_Map_Engine.rb', line 2696

def list
  @list
end

#original_idInteger (readonly)

Returns Original id of the event.

Returns:

  • (Integer)

    Original id of the event



2706
2707
2708
# File 'docs/4_Systems_003_Map_Engine.rb', line 2706

def original_id
  @original_id
end

#original_mapInteger (readonly)

Returns Original map id of the event.

Returns:

  • (Integer)

    Original map id of the event



2708
2709
2710
# File 'docs/4_Systems_003_Map_Engine.rb', line 2708

def original_map
  @original_map
end

#startingBoolean (readonly)

Returns if the event wants to start.

Returns:

  • (Boolean)

    if the event wants to start



2698
2699
2700
# File 'docs/4_Systems_003_Map_Engine.rb', line 2698

def starting
  @starting
end

#sym_aliasSymbol? (readonly)

Returns The symbol alias of the event.

Returns:

  • (Symbol, nil)

    The symbol alias of the event



2710
2711
2712
# File 'docs/4_Systems_003_Map_Engine.rb', line 2710

def sym_alias
  @sym_alias
end

#triggerInteger? (readonly)

Returns Type of trigger for the event (0: Action key, 1: Player contact, 2: Event contact, 3: Autorun, 4: Parallel process).

Returns:

  • (Integer, nil)

    Type of trigger for the event (0: Action key, 1: Player contact, 2: Event contact, 3: Autorun, 4: Parallel process)



2694
2695
2696
# File 'docs/4_Systems_003_Map_Engine.rb', line 2694

def trigger
  @trigger
end

Instance Method Details

#activated?Boolean

Check if the character is activate. Useful to make difference between event without active page and others.

Returns:

  • (Boolean)


2764
2765
# File 'docs/4_Systems_003_Map_Engine.rb', line 2764

def activated?
end

#can_be_shown?Boolean

Tell if the event can have a sprite or not

Returns:

  • (Boolean)


2724
2725
# File 'docs/4_Systems_003_Map_Engine.rb', line 2724

def can_be_shown?
end

#can_parallel_execute?Boolean

Tell if the event can execute in parallel process or automatic process

Returns:

  • (Boolean)


2721
2722
# File 'docs/4_Systems_003_Map_Engine.rb', line 2721

def can_parallel_execute?
end

#check_event_trigger_auto

Check if the event starts automaticaly and start if so



2748
2749
# File 'docs/4_Systems_003_Map_Engine.rb', line 2748

def check_event_trigger_auto
end

#check_event_trigger_touch(x, y)

Check if the event touch the player and start it if so

Parameters:

  • x (Integer)

    the x position to check

  • y (Integer)

    the y position to check



2745
2746
# File 'docs/4_Systems_003_Map_Engine.rb', line 2745

def check_event_trigger_touch(x, y)
end

#clear_starting

Sets @starting to false allowing the event to move with its default move route



2727
2728
# File 'docs/4_Systems_003_Map_Engine.rb', line 2727

def clear_starting
end

#erase

Remove the event from the map



2737
2738
# File 'docs/4_Systems_003_Map_Engine.rb', line 2737

def erase
end

#find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil)

Use path finding to locate the current event move else

Examples:

find path to x=10 y=15 with an error radius of 5 tiles

find_path(to:[10,15], radius:5)

Parameters:

  • to (Array<Integer, Integer>, Game_Character)

    the target, [x, y] or Game_Character object

  • radius (Integer) (defaults to: 0)

    <default : 0> the distance from the target to consider it as reached

  • tries (Integer, Symbol) (defaults to: Pathfinding::TRY_COUNT)

    <default : 5> the number of tries allowed to this request, use :infinity to unlimited try count

  • type (Symbol) (defaults to: nil)


2760
2761
# File 'docs/4_Systems_003_Map_Engine.rb', line 2760

def find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil)
end

#initialize_parse_name

Parse the event name in order to setup the event particularity



2717
2718
# File 'docs/4_Systems_003_Map_Engine.rb', line 2717

def initialize_parse_name
end

#over_trigger?Boolean

Tells if the Event cannot start

Returns:

  • (Boolean)


2731
2732
# File 'docs/4_Systems_003_Map_Engine.rb', line 2731

def over_trigger?
end

#refresh

Refresh the event : check if an other page is valid and if so, refresh the graphics and command list



2740
2741
# File 'docs/4_Systems_003_Map_Engine.rb', line 2740

def refresh
end

#start

Starts the event if possible



2734
2735
# File 'docs/4_Systems_003_Map_Engine.rb', line 2734

def start
end

#update

Update the Game_Character and its internal Interpreter



2751
2752
# File 'docs/4_Systems_003_Map_Engine.rb', line 2751

def update
end