.

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Collision Sound by DiamondandPlatinum3 should do the trick for one of your requests. With editing you can get rid of any features you want disabled.
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
Well your script does have an error.
I added the switch to DP3's script.
Code:
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#             Collision Sound
#             Author: DiamondandPlatinum3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Description:
#
#    This script plays a collision sound when you try walking on to an
#    non-passable space. This is not used if you have 'through' checked on your
#    player on the other hand.
#    Collision sound only works for the Player, it does not play for other
#    events if they try to walk into something they shouldn't.
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#------------------------------------------------------------------------------
#  Instructions:
#
#     Editable Region, simply replace the Filename, VOlume & Pitch for the
#     Collision_SE. You must also set a wait timer until it can be heard again.
#     This is because the collision sound can play many many times if you keep
#     attempting to walk into a wall, so this option sets the cooldown time until
#     it can be heard again.
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
class Game_Player < Game_Character
 
  #----------------------------------------
  #     Editable Region
  #----------------------------------------
  Collision_SE          = [ "Bite", 80, 100 ]   # The Collision Sound you wish to play, volume, pitch.
  Collision_Wait_Timer  = 60                    # Wait Timer (in frames) until next collision sound.
  Collision_Switch = 3     # On to play sounds
  #----------------------------------------
 
 
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias dp3_collisionsound_gameplayer_update_sevt       update
  def update
    dp3_collisionsound_gameplayer_update_sevt()
    @collision_sound_timer  = 0 unless @collision_sound_timer != nil
    @collision_sound_timer -= 1 unless @collision_sound_timer == 0
  end
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #--------------------------------------------------------------------------
  alias dp3_collisionsound_gameplayer_passable_sevt       passable?
  def passable?( *args )
    passable = dp3_collisionsound_gameplayer_passable_sevt( *args )
    return passable unless $game_switches[Collision_Switch] == true
    unless passable == true || @collision_sound_timer > 0
      RPG::SE.new(*Collision_SE).play
      @collision_sound_timer = Collision_Wait_Timer
    end
    return passable
  end
end

Your script gives an error with
Code:
  alias romanticist_frame_update update
  def update
   romanticist_gameplayer_frame_update
it should be
Code:
  alias romanticist_frame_update update
  def update
   romanticist_frame_update
The gameplayer doesn't go in the alias. it must be the same alias inside the method.

*EDIT
For your second request, there's this script
http://rmrk.net/index.php?topic=45866.0
 
Last edited:

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
SWITCH = OFF
Jump Common Event
SWITCH = ON
I need to see more of your code.
My testing has it working, but we don't have the same setup.
What does the event have in it, what does the common event have in it.
Update your original post with your script for collision.
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
I put your script in a test project and set it up just like you have and it works fine.
Just a note as well, you don't need to call a common event or change the switches before hand.
It can all be in one move route.
upload_2019-4-2_16-53-43.png or upload_2019-4-2_16-56-41.png

But I don't see how it would still cause a problem. turning the switches on or off doesn't cause any problems in my test.
It must be something to do with your map or a script incompatibility.
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
Ok I see now.
The system is processing the collision before you get to perform the actions in the event.

you need to make the event run before the passable method occurs. Not sure about that.

Otherwise you would have to turn the switch off before the player gets to the edge.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
I would use a region ID, or make a check to see if the player is facing a 'jump' event by giving jump events a specific name.

E.g.
Code:
class Game_Player < Game_Character

  alias romanticist_collisionbump_sfx passable?
  def passable?(*args)
    passable = romanticist_collisionbump_sfx(*args)
    x2 = $game_map.round_x_with_direction(@x, @direction)
    y2 = $game_map.round_y_with_direction(@y, @direction)
    return passable if facing_jump_event?
    return passable unless $game_switches[Collision_Switch]
    unless passable || @collision_sound_timer > 0
      RPG::SE.new(*Collision_SE).play
      @collision_sound_timer = Collision_Wait_Timer
    end
    return passable
  end
 
  def facing_jump_event?
    x2 = $game_map.round_x_with_direction(@x, @direction)
    y2 = $game_map.round_y_with_direction(@y, @direction)
    return false unless $game_map.event_id_xy(x2, y2) > 0
    return $game_map.events[$game_map.event_id_xy(x2, y2)].jump_event?
  end
 
end

class Game_Event < Game_Character
 
  def name
    @event.name
  end
 
  def jump_event?
    name.include?("jump") # or whatever unique name you want to use
  end
 
end
Any events with 'jump' in the name will not use the collision sound. Then you can turn off the switch, perform the jump, then turn the switch back on (in the event).
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
This is what I used to make it work.
upload_2019-4-3_9-6-5.pngupload_2019-4-3_9-12-23.png
upload_2019-4-3_9-11-12.pngupload_2019-4-3_9-11-37.png

The bump sound did not play.
If I made the event a player touch then the sound played.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Sorry, I was just showing the bits to add/change rather than changing the whole script. I've got an idea for using directions in the name to decide whether you can jump, but I won't have time to mock something up until later on today.

EDIT: Here you go, this should do the trick.
Code:
class Game_Player < Game_Character
 
  Collision_SE = ["collision", 85, 50]
  Collision_Wait_Timer = 20
  Collision_Switch = 26
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias romanticist_frame_update update
  def update
    romanticist_frame_update
    @collision_sound_timer = 0 unless @collision_sound_timer != nil
    @collision_sound_timer -= 1 unless @collision_sound_timer == 0
  end
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #--------------------------------------------------------------------------
  alias romanticist_collisionbump_sfx passable?
  def passable?(x, y, d)
    passable = romanticist_collisionbump_sfx(x, y, d)
    return passable if facing_jump_event?(d)
    return passable unless $game_switches[Collision_Switch]
    unless passable || @collision_sound_timer > 0
      RPG::SE.new(*Collision_SE).play
      @collision_sound_timer = Collision_Wait_Timer
    end
    return passable
  end
 
  def facing_jump_event?(direction)
    x2 = $game_map.round_x_with_direction(@x, direction)
    y2 = $game_map.round_y_with_direction(@y, direction)
    return false unless $game_map.event_id_xy(x2, y2) > 0
    return false unless $game_map.events[$game_map.event_id_xy(x2, y2)].jump_event?
    return $game_map.events[$game_map.event_id_xy(x2, y2)].jump_directions.include?(direction)
  end
 
end

class Game_Event < Game_Character
 
  def name
    @event.name
  end
 
  def jump_event?
    name.include?("jump")
  end
 
  def jump_directions
    res = []
    name.scan(/jump\s*<(.+)>/i).each do |i|
      i.each { |e| res << e.strip.split(",") }
    end
    res = res.flatten.map(&:to_i)
  end
 
end
So for an event that lets you jump left and right only, the name would be
Code:
jump <4,6>
 
Last edited:

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
682
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Cool, glad it works! Yep, the numbers in VXAce correspond to the keypad on most laptops, where 8 is up, 6 is right, 2 is down and 4 is left.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,447
Members
137,820
Latest member
georg09byron
Top