• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Big Push Events for PSDK 2020-07-28

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:
#===============================================================================
# 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
926
First release
Last update
Rating
0.00 star(s) 0 ratings
Back
Top