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,855
Reaction score
8,578
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

 …So I was looking at a question someone had asked and did some related experimentation. Apparently the Jump… movement route command works like the ultimate through. Including letting you move around outside the confines of the map entirely. o_O
Jump.png
Okay so today I heard the dumbest theory I have heard in a loooooooong while. It's so stupid I just have to share... Appearantly I have learned to draw 'hot chicks' so that 'real men' get physically excited by looking at it and I can then swoop in and 'turn' them.... Wow... Just... Amazing how some brains works...
What the writer wrote: "The curtain is blue."
The readers: "There must be a hidden meaning behind this, perhaps to convey the character emotions ...".
What the writer has in mind: "The curtain is frickin' blue".
Time to share something!
hmZFwQe.png

I made these a while ago for my game. I took reference from various huts in Africa.
Have a great night! :D
I really need to buy a new mouse. Mine's keeps double-clicking and makes me waste A LOT of time eventing

Forum statistics

Threads
115,844
Messages
1,093,364
Members
151,038
Latest member
ClaudeSpeeds
Top