• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Big Push Events for PSDK 2020-07-28

  • Author Author Deleted member 1065
  • Creation date Creation date
Pokémon Essentials Version
Non-applicable
Works under PSDK .24.81+



This script allows you to tether multiple events together to move as one. Think strength rocks from gen 5, that size. Or bigger, or wide and thin rocks.

Each event in the unit must contain the same script call:
push_many_events(width, height, list of all the tethered event ids)
Example:
push_many_events(2, 2, 10, 11, 12, 13)
Will push a block of 2x2 events and the events IDs are 10, 11, 12, 13.

Mind, if you're using tiles from the Tileset and Player Touch, the tiles can't have Passage (4 dir) set. It's all or nothing for Player Touch.

Script:
Ruby:
Expand Collapse Copy
#===============================================================================
# Big Push Events - By Vendily, Converted to PSDK by Nuri Yuri
#===============================================================================
# This script allows you to tether multiple events together to move as one.
# Think strength rocks from gen 5, that size. Or bigger, or wide and thin rocks.
#===============================================================================
# Each event in the unit must contain the same script call:
#   push_many_events(width, height, *list of event id to push)
# Mind, if you're using tiles from the Tileset and Player Touch, the tiles can't
#  have Passage (4 dir) set. It's all or nothing for Player Touch
#===============================================================================
class Interpreter
  def push_many_events(w, h, *event_ids)
    events = event_ids.map { |id| get_character(id) }
    d = w
    case $game_player.direction
    when 2
      events.sort!{|a,b|
        next -(a.y<=>b.y) if a.y != b.y
        next (a.x<=>b.x)
      }
    when 4
      d = h
      events.sort!{|a,b|
        next (a.x<=>b.x) if a.x != b.x
        next (a.y<=>b.y)
      }
    when 6
      d = h
      events.sort!{|a,b|
        next -(a.x<=>b.x) if a.x != b.x
        next (a.y<=>b.y)
      }
    when 8
      events.sort!{|a,b|
        next (a.y<=>b.y) if a.y != b.y
        next (a.x<=>b.x)
      }
    end
   
    return unless d.times.map{ |i| events[i]}.all? { |e| e.passable?(e.x, e.y, $game_player.direction) }

    move_route = RPG::MoveRoute.new
    move_route.repeat = false
    move_route.skippable = true
    move_route.list[0].code = $game_player.direction / 2
    move_route.list << RPG::MoveCommand.new
   
    events.each { |e| e.force_move_route(move_route) }
    @move_route_waiting = true
  end
end

How to install: https://psdk.pokemonworkshop.fr/wiki/en/manage/install-script.html

Original resource: https://reliccastle.com/resources/412/
Credits
Vendily, Nuri Yuri
Author
Deleted member 1065
Views
973
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back
Top