• 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

Resource Spin Tiles 2020-08-11

Vendily

Elite Trainer
Member
Vendily submitted a new resource:

Spin Tiles - Spin 'til you drop

WnMKE2g.gif

This script adds in Spin tiles, a Pokémon staple! Once the player steps on one of these tiles, they'll go spinning in the direction on the tile until they hit an impassable object. Hitting another spin tile redirects the player.

To use it, you must create 4 new tiles with terrain tags specifying the spun direction. Remember to change the presets if you have other terrain tags installed!

There's also one other edit to def...

Read more about this resource...
 

Vendily

Elite Trainer
Member
Vendily updated Spin Tiles with a new update entry:

Stop tiles added!

This update adds in Stop tiles, which is a thing, apparently? Never really played much of RBY, FRLG, or HGSS, so I never saw them.

Stop tiles do exactly what you think they do, stop the player dead in their tracks if they're spinning.

If you don't plan on using them, just set the terrain tag to -1!

Read the rest of this update entry...
 

Vendily

Elite Trainer
Member
Vendily updated Spin Tiles with a new update entry:

Fixes to Move Speed and Funny Frames (Still v17)

Thanks to thepsynergist and Barrel's O'Fun, a number of bugs were quashed in this update!
For starters, when spinning, one frame stays on longer than the rest (I think? I personally can't tell but that's fixed now)

Also you can't start running in the middle of a spin tile, causing shenanigans with the displayed sprite.

Finally, you can no longer sprint head long into a spin tile and carry that speed through.

Read the rest of this update entry...
 

Mr. Gela

Discord: theo#7722
Member
Joined
Jul 19, 2015
Posts
185
Didn't know this existed. Good sh--... Good!
In the instructions however, it reads "new lines in red" but no lines are in red. Not that it matters much as you can compare the code provided to our own/vanilla but bringing it up anyway.
 

Leondrea

Trainer
Member
Joined
Jul 26, 2020
Posts
95
This is amazing, does it still work for Essentials v.18.1?
And is there a way to make the player sit on a bench/chair
with a similar script like this?
Here is the graphic, I have some of my players, I just changed the head and body part
Thanks in advance
 

Attachments

  • NPC 03.png
    NPC 03.png
    2 KB · Views: 222

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
275
Tried to make a port but things such as animation are neglected.
Ruby:
Expand Collapse Copy
module GameData
  class TerrainTag
    attr_reader :spin_tile

    alias spin_initialize initialize
    def initialize(hash)
      spin_initialize(hash)
      @spin_tile = hash[:spin_tile]  || false
    end
  end
end

# You can renumber terrain tag id number if necessary.
GameData::TerrainTag.register({
  :id                     => :SpinTileUp,
  :id_number              => 41,
  :spin_tile              => true
})

GameData::TerrainTag.register({
  :id                     => :SpinTileDown,
  :id_number              => 42,
  :spin_tile              => true
})

GameData::TerrainTag.register({
  :id                     => :SpinTileLeft,
  :id_number              => 43,
  :spin_tile              => true
})

GameData::TerrainTag.register({
  :id                     => :SpinTileRight,
  :id_number              => 44,
  :spin_tile              => true
})

GameData::TerrainTag.register({
  :id                     => :SpinTileStop,
  :id_number              => 45
})

class PokemonGlobalMetadata
  attr_accessor :spinning
  alias spin_initialize initialize
  def initialize
    spin_initialize
    @spinning = false
  end
end

EventHandlers.add(:on_step_taken, :spin_tile,
  proc { |event|
    next if !$scene.is_a?(Scene_Map)
    next if event != $game_player
    currentTag = $game_player.pbTerrainTag
    if currentTag.spin_tile
      pbSpinTile
    end
  }
)

def pbSpinTile 
  tag = $game_player.pbTerrainTag
  return if !tag.spin_tile
  oldwalkanime = $game_player.walk_anime
  $game_player.move_speed == 1
  if !$PokemonGlobal.spinning
    $game_player.straighten
  end
  $game_player.walk_anime = false
    case tag.id
    when :SpinTileUp
      $game_player.turn_up     
      $game_player.pattern = 2 if !$PokemonGlobal.spinning
    when :SpinTileDown
      $game_player.turn_down
      $game_player.pattern = 0 if !$PokemonGlobal.spinning
    when :SpinTileRight
      $game_player.turn_right
      $game_player.pattern = 1 if !$PokemonGlobal.spinning
    when :SpinTileLeft
      $game_player.turn_left
      $game_player.pattern = 3 if !$PokemonGlobal.spinning
    end
  $game_player.walk_anime = true
  $PokemonGlobal.spinning = true
  loop do
    break if !$game_player.passable?($game_player.x, $game_player.y, $game_player.direction)
    break if tag.id == :SpinTileStop
    case tag.id
    when :SpinTileUp
      $game_player.turn_up
    when :SpinTileDown
      $game_player.turn_down
    when :SpinTileRight
      $game_player.turn_right
    when :SpinTileLeft
      $game_player.turn_left
    end
    $game_player.move_forward
    while $game_player.moving?
      Graphics.update
      Input.update
      pbUpdateSceneMap
    end
  end 
  $game_player.center($game_player.x, $game_player.y)
  $game_player.walk_anime = oldwalkanime 
  $PokemonGlobal.spinning = false
end
 
Back
Top