RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] Grass slow movement

0 Members and 2 Guests are viewing this topic.

**
Rep: +0/-0Level 73
You sure this is where we parked the airship...
OK I am just wondering if there is a way other than a huge area filled with events to have the character slow down when walking in deep grass/snow/bushes or something like that.
« Last Edit: May 26, 2015, 01:23:17 AM by yuyu! »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
Well, it wouldn't have to be filled with events. It could be done by just having a layer of events all around it. Or, alternatively, you could use a single parallel process event which sets the Player's X and Y ot variables, and you could then use a series of conditional branches to check if the player was in a slow-down area or not, and set movement speed accordingly.

Also, there are scripts which can do it. For instance, if you're using RMVX, my Terrain Types script has that feature, though configuration might be a little heavy.

I am sure there are similar scripts for RMXP and, of course, it is a default option in RM2k3, so if that's what you're using it's simply a matter of going into the database.

***
Rep:
Level 76
Shh, they're listening...
Variables, as mentioned above, would likely be your best bet if you're not big on script-use. You can use terrain tags to set which parts of the tileset will cause slow down.

I actually made a demo for something else, awhile back, to show how terrain tags and variables work. It's very simple but I've found it takes up the least amount of resources. For evented system, anyhow.

http://rmrk.net/index.php/topic,39866.msg459917.html#msg459917

If nothing else it can act as a starting point to figuring out how to make your tall grass/snow idea work.

**
Rep: +0/-0Level 73
You sure this is where we parked the airship...
crap I did forget to say what program I am using didn't I lol yes I am using VX

Modern Algebra- I thought of just ringing the area with events  to slow/resume speed but with such a large area I think it will get laggy because the area I want to have movement slowed down in is one half of a "continent" of deep grass with random sized spaces of no grass, and the other is the obligatory snow/ice continent. I will give your Terrain types a try and see if I can get it to work for me as I am using a number of your other scripts and love them   :)


Drye- As I am somewhat absent minded and forgot to state that I am using VX I am not sure if I can use your demo as a guide but will give that a try as well.

**
Rep: +0/-0Level 73
You sure this is where we parked the airship...
Well MA, it seems that your Terrain Type is a little more complicated than I am able to handle LOL so I will have to try the parallel process idea and see how that works out.

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
Or what you can do is get the Tile ID for grass tiles and make an event that says slow walk speed if stepping on x tile else return to normal speed. I'd have to check this out first though. Never really messed with that.


**
Rep: +0/-0Level 73
You sure this is where we parked the airship...
OK Nessiah I am a bit new still how do I go about getting the ID for the grass tile I am using?

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
http://www.rpgmakervx.net/index.php?showtopic=19047&st=0&p=165421&#entry165421

What I'm not sure is how to actually bind it to a variable. Sorry. A scripter might be better for it.

But here's probably something that would interest you:
http://www.rpgmakervx.net/lofiversion/index.php/t42080.html
I can't find said mithran script tho '_');

Or use this:

Code: [Select]
#==============================================================================
# ** RMVX Eventer's Toolbox
#------------------------------------------------------------------------------
# * Includes several different utilities to make eventing easier.
# 10-03-2008 (dd-mm-yyyy) Â © Hevendor of hbgames.org
# Version 0.2.2
# Latest update: N/A
#==============================================================================

#==============================================================================
# * INSTRUCTIONS
# Remember when you had to set player coords, event coords to variables
# just to check where your events were, where rocks were etc.?
# Not anymore! Rock-pushing puzzles? Made easy!
# Use each of these commands wherever you want, though they are designed to use
# in a conditional branch event command. An example follows:
# @>Conditional Branch: $game_map.standing_on_tile?(5, 13)
#     @> Do stuff, will happen if you ARE standing on the coords 5,13
#   Else
#     @> Do the rest of stuff, will happen if you ARE NOT standing on 5,13
#------------------------------------------------------------------------------
# * COMMANDS
# $game_map.standing_on_tile?(x, y)
#   - checks if player is standing on map coordinates (x, y)
#
# $game_map.standing_on_event?(id)
#   - checks if player is standing on event (id)
#
# $game_map.adjacent_tile?(x, y, standing)
#   - checks if player is adjacent to tile (x, y).
#   - if standing = false, it will check only if you are adjacent
#   - if standing = true, it will check if you are adjacent OR standing on tile
#
# $game_map.cross_adjacent_event?(id, n)
#   - checks if player is in a cross range of event ID, where n is the radius
# of the cross. To check if player is adjacent to event, use n=1
#
# $game_map.event_adjacent_event?(id, id2, n)
#   - checks if event (id) is adjacent to event (id2), where n is the radius
# of the cross. To check if the events are directly adjacent, use n=1.
#
# $game_map.event_standing_coords?(id, x, y)
#   - checks if event (id) is standing on map coordinates (x, y).
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :px
  attr_accessor :py
  #--------------------------------------------------------------------------
  # * Alias Definitions
  #--------------------------------------------------------------------------
  alias hev_rmvx_toolbox_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    hev_rmvx_toolbox_initialize
    @px = 0
    @py = 0
  end
  #--------------------------------------------------------------------------
  # * Player standing on map coords (x, y)?
  #--------------------------------------------------------------------------
  def standing_on_tile?(x, y)
   if $game_player.x == x and $game_player.y == y
     return true
   else
     return false
    end
  end
  #--------------------------------------------------------------------------
  # * Player standing on event (id)?
  #--------------------------------------------------------------------------
  def standing_on_event?(id)
    if $game_player.x == @events[id].x && $game_player.y == @events[id].y
      return true
    else
      return false
    end
  end
  #--------------------------------------------------------------------------
  # * Is player adjacent (or standing on) to tile (x, y)?
  #--------------------------------------------------------------------------
  def adjacent_tile?(x, y, standing)
     @px = $game_player.x
     @py = $game_player.y
    if standing = false
     if (@px != x && @py != y) || (@px == x && @py == y)
      return false
     end
    end
    if standing = true
     if (@px != x && @py != y)
       return false
     end
    end
    if @px < x
      if (x - @px) <= 1
        return true
      end
    end
    if @px > x
      if (@px - x) - @px <= 1
        return true
      end
    end
    if @py > y
      if (@py - y) <= 1
        return true
      end
    end
    if @py < y
      if (y - @py) <= 1
        return true
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Is player (n) tiles adjacent to event (id) [in a cross pattern]?
  #--------------------------------------------------------------------------
  def cross_adjacent_event?(id, n)
     @px = $game_player.x
     @py = $game_player.y
    if (@px != @events[id].x && @py != @events[id].y) || (@px == @events[id].x && @py == @events[id].y)
      return false
    end
    if @px < @events[id].x
      if (@events[id].x - @px) <= n
        return true
      end
    end
    if @px > @events[id].x
      if (@px - @events[id].x) - @px <= n
        return true
      end
    end
    if @py > @events[id].y
      if (@py - @events[id].y) <= n
        return true
      end
    end
    if @py < @events[id].y
      if (@events[id].y - @py) <= n
        return true
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Is event (id) adjacent to event (id2?)
  #--------------------------------------------------------------------------
  def event_adjacent_event?(id, id2, n)
    if @events[id].x != @events[id2].x && @events[id].y != @events[id2].y
      return false
    end
    if @events[id].x == @events[id2].x && @events[id].y == @events[id2].y
      return false
    end
    if @events[id].x < @events[id2].x
      if (@events[id2].x - @events[id].x) <= n
        return true
      end
    end
    if @events[id].x > @events[id2].x
      if (@events[id].x - @events[id2].x) - @events[id].x <= n
        return true
      end
    end
    if @events[id].y > @events[id2].y
      if (@events[id].y - @events[id2].y) <= n
        return true
      end
    end
    if @events[id].y < @events[id2].y
      if (@events[id2].y - @events[id].y) <= n
        return true
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Is event (id) standing on map coords. (x, y)?
  #--------------------------------------------------------------------------   
  def event_standing_coords?(id, x, y)
    if @events[id].x == x && @events[id].y == y
      return true
    else
      return false
    end
  end
end

If you're resorting to using events instead, make sure to have anaryu's anti-lag script.
« Last Edit: November 09, 2011, 10:06:35 AM by Nessiah »


**
Rep: +0/-0Level 73
You sure this is where we parked the airship...
OK how do I find the Tile ID? I have found online that lets say TileA tiles can have an ID of something like 5445 and TileB tiles can have an ID of something like 2210.