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,853
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

I really need to buy a new mouse. Mine's keeps double-clicking and makes me waste A LOT of time eventing
How come there's no spooktober game jam? I thought horror maker games were some of the most popular genre out there...
"I didn't know X song was about that!" Uh... why? Do you not listen to the lyrics? I mean, I guess that makes sense. We live in a world where nobody listens, but everyone wants to be heard.
Coding class: Python
Game dev work: Javascript
Result: AHHH!!! Writing program for an assignment and having it crash and burn because I used Javascript syntax or format. Or having my game die on me because of a python call :yswt:
Can we make it so whenever a banned user tries to use their account whilst banned, the forum should redirect to this

Forum statistics

Threads
115,835
Messages
1,093,328
Members
151,027
Latest member
Mansfield40matt
Top