Status
Not open for further replies.

Hunewearl

Veteran
Veteran
Joined
Oct 8, 2015
Messages
34
Reaction score
2
First Language
English
Primarily Uses
Can anyone help me with this script please? I need to add screen shake with the sound FX =)

#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles the player. It includes event starting determinants and
# map scrolling functions. The instance of this class is referenced by
# $game_player.
#==============================================================================

class Game_Player < Game_Character
#------------------------------
# Editable Region --
#------------------------------
Collision_SE = [ "Thunder1", 80, 100 ] # Filename, Volume, Pitch
Collision_Wait_Timer = 60 # Wait Time (In Frames) before next Collision Sound
#------------------------------


#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias dp3_gameplayer_update_10dju update
alias dp3_gameplayer_passable_10dju passable?
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
$game_temp.dp3_collision_sound_timer -= 1 if $game_temp.dp3_collision_sound_timer > 0
dp3_gameplayer_update_10dju()
end
#--------------------------------------------------------------------------
# * Determine if Passable
#--------------------------------------------------------------------------
def passable?( *args )
passable = dp3_gameplayer_passable_10dju( *args )
unless passable || $game_temp.dp3_collision_sound_timer > 0
RPG::SE.new( *Collision_SE ).play
$game_temp.dp3_collision_sound_timer = Collision_Wait_Timer
end
return passable
end
end




#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
# This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================

class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :dp3_collision_sound_timer # Collision Sound Timer
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias dp3_gametemp_initialise_10dju initialize
#--------------------------------------------------------------------------
def initialize
@dp3_collision_sound_timer = 0
dp3_gametemp_initialise_10dju()
end
end
 

Prodigy 1216

Prodigious Member
Veteran
Joined
Dec 21, 2013
Messages
175
Reaction score
97
First Language
Malanglish
Primarily Uses
N/A
you mean during battle or on map?
 

Hunewearl

Veteran
Veteran
Joined
Oct 8, 2015
Messages
34
Reaction score
2
First Language
English
Primarily Uses
Oh, sorry. the script triggers when walking into a none movable tile. so i guess its map?
 

Prodigy 1216

Prodigious Member
Veteran
Joined
Dec 21, 2013
Messages
175
Reaction score
97
First Language
Malanglish
Primarily Uses
N/A
By doing events just put the SE before the screen shakes.
 
Last edited by a moderator:

Hunewearl

Veteran
Veteran
Joined
Oct 8, 2015
Messages
34
Reaction score
2
First Language
English
Primarily Uses
ah i would need lots of events for what i got planned. thats why i got this script.
 

Prodigy 1216

Prodigious Member
Veteran
Joined
Dec 21, 2013
Messages
175
Reaction score
97
First Language
Malanglish
Primarily Uses
N/A
Just replace the "Thunder1" with your screen shake sound effect's filename in resource manager. Then put in the volume for that sound effect and also the pitch sound.

For example: ["Quake1", 100, 80]

Now it will play the SE with the filename Quake1 with 100 volume level and 80 pitch level. 

#------------------------------
# Editable Region --
#------------------------------
Collision_SE = [ "Thunder1", 80, 100 ] # Filename, Volume, Pitch <------Put It Here
Collision_Wait_Timer = 60 # Wait Time (In Frames) before next Collision Sound#------------------------------
 

Hunewearl

Veteran
Veteran
Joined
Oct 8, 2015
Messages
34
Reaction score
2
First Language
English
Primarily Uses
I am after the visual screen shake effect =)
 

Prodigy 1216

Prodigious Member
Veteran
Joined
Dec 21, 2013
Messages
175
Reaction score
97
First Language
Malanglish
Primarily Uses
N/A
I think the script does no effect to visuals. You should try to search for other scripts. Sorry but I can't help you with issue.
 

Hunewearl

Veteran
Veteran
Joined
Oct 8, 2015
Messages
34
Reaction score
2
First Language
English
Primarily Uses
oh! I managed to fix it with a common event =) 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,724
Reaction score
8,508
First Language
German
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts


1,Randomly generate events with planted spawner events(great flexibility for customization and auto-match player's level)
2,Randomly enter roguelike dungeon
3,Player can exit dungeon or back to town or choose to challenge BOSS at the end of each dungeon
4,Dungeon maps can be randomly generated by a third-party tool
Got locked out of the house yesterday... best friends who had the spare ghosted me. Locksmith had to literally drill thru the lock bc they couldn't pick it. Whole process took 4 hours and far too much money. And they have to come back next week bc they don't have the right cylinder, cause it's an old interlocking lock. I'm livid lol
 I’m probably going to regret this, but I need kobolds for my project and I’ve decided to sprite them myself. This is Attempt #1, front view only.

KoboldFront.gif
It's a shame that Selection Control will not be ported to MZ. I found a neat way of using it to enable ways for tanks to protect squishies. lol
Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.

Forum statistics

Threads
115,354
Messages
1,089,218
Members
150,029
Latest member
Cwiras
Top