So this is the first time i'm ever attempting to get into coding on RGSS3 by just starting on DiamondAndPlatinum3's video tutorials. I haven't bothered checking out the Ruby documentation so since i have a really scarse internet on vacation i just wanted to post here for help. I've reached up to Tutorial 20 since the creation of this post.
I'm working on a script that would emit a LSD-like effect when you have been afflicted by an assigned state, but i'm having severe problems on finding the classes and methods needed to build up the script.
The script would work what i am intending, in which there would be a method that would check for a specific state ID needed for the dizzy effect, and then when said state is owned by one of your actors, the effect would be enabled and would change your current BGM's pitch by pitching it down and up (zig zag), which each pitch value is changed by a timer variable and a variable that chooses if to pitch up or pitch down.
This is the current revision of my script, and i would let anyone judge me if there's atleast a detail i've found. This is the first time and i thought of this idea myself, even if actually i did copy some of vx ace's default script parts.
EDIT: Since this post has pretty much been ignored, i got help at rpgmaker.net to see about fixing this code, but i found out that it doesn't seem to be done because RPG Maker VX Ace does a frame of pause whenever changing music, so changing the pitch in real time from a variable is likely not good and the result is not what i've expected. The result is that this script likely to be cancelled because real-time changing pitch music cannot be done due to technical limitations.
I'm working on a script that would emit a LSD-like effect when you have been afflicted by an assigned state, but i'm having severe problems on finding the classes and methods needed to build up the script.
The script would work what i am intending, in which there would be a method that would check for a specific state ID needed for the dizzy effect, and then when said state is owned by one of your actors, the effect would be enabled and would change your current BGM's pitch by pitching it down and up (zig zag), which each pitch value is changed by a timer variable and a variable that chooses if to pitch up or pitch down.
This is the current revision of my script, and i would let anyone judge me if there's atleast a detail i've found. This is the first time and i thought of this idea myself, even if actually i did copy some of vx ace's default script parts.
Code:
Dizzy_State = 26
Dizzy_Pitch_Timer = 15
class Game_System
#--------------------------------------------------------------------------
# * Save BGM
#--------------------------------------------------------------------------
alias sc00p_DizzinessState_savebgm save_bgm
def save_bgm
@saved_bgm = RPG::BGM.last
end
end
class Game_BattlerBase
#--------------------------------------------------------------------------
# * Check State
#--------------------------------------------------------------------------
alias sc00p_DizzinessState_checkstate state?
def state?(state_id)
@dizzystate = sc00p_DizzinessState_checkstate(Dizzy_State)
end
end
class Game_Interpreter
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias sc00p_DizzinessState_initialization initialize
def initialize(depth = 0)
sc00p_DizzinessState_initialization()
@dizzyPitch = 100
p("Dizziness initialized")
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias sc00p_DizzinessState_update update
def update
sc00p_DizzinessState_update()
@dizzy_pitch_timer = 0 unless @dizzy_pitch_timer != nil
@dizzy_pitch_timer -= 1 unless @dizzy_pitch_timer == 0
if @dizzystate == true
save_bgm()
end
end
EDIT: Since this post has pretty much been ignored, i got help at rpgmaker.net to see about fixing this code, but i found out that it doesn't seem to be done because RPG Maker VX Ace does a frame of pause whenever changing music, so changing the pitch in real time from a variable is likely not good and the result is not what i've expected. The result is that this script likely to be cancelled because real-time changing pitch music cannot be done due to technical limitations.