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,908
Reaction score
8,600
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

one dislike. tragic really ofended me bruh
i only have one decent song and i dont even think it fits for a video game
Update: I finished the combat arena! My goodness, it took a while! There were numerous little bugs to squash.
Maldra wrote on stramin's profile.
Hi regarding the 32 bit -> 64 bit
I am running on a 64 bit windows OS and tried doing this conversion. I converted all of the .exe files that I could find in the KADOKAWA\RPGMV folder using the 4gbpatch.exe file. However, after trying to access RPG Maker MV after this conversion, it simply will not load. Do you have any advice or any ideas?
****ing muscle memory: does anyone else habitually quit out of test play when they notice something they """HAVE""" to fix, in spite of the fact that you can now edit DURING test play?

...thousands of times...

...every day?

Forum statistics

Threads
115,931
Messages
1,094,169
Members
151,191
Latest member
gioitreyan
Top