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,888
Reaction score
8,591
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

I typically ask this on my normal social media channels, but figured there may be good replies here. Anyone got any good horror movie recommendations? I've seen a lot, but I always love getting suggestions! Bonus points if you know which service it is streaming on (in the US) - bring on the spOoooOky!
 After a few distractions (and my annual rough second week of October), I’m getting back on track with my OMGC project.
 Am I overcomplicating it? Yes. Am I going to tone it down? Almost certainly not.
 At least the dialogue stuff is almost done. I need to do the map itself, and then all that’s left is combat.
 Getting there!
Creating 3D CGs for Cutscenes. :kaosalute:

I keep wanting to post every song I make for the game and have to hold back on that because at this rate, I'll have spoiled all the really good stuff lol..

Forum statistics

Threads
115,903
Messages
1,093,844
Members
151,153
Latest member
Mitty_Muse
Top