RPG Maker Forums

Ok so I've been attempting to learn RGSS3 and scripting in ace and for the most part have been doing pretty good until now... I have been following diamondandplatinum3's scripting tutorials and have written a few scripts with what I've learned but in an attempt to follow him and script the latest script I have run into an odd problem that I can't seem to figure out.

Here is the script:

module BalloonFX

  

Event_Switch_ID = 10

    

  Exclamation  = ["Raise1", 80, 100]

  Question     = ["Confuse", 80, 100]

  Music_Note   = ["Sound1", 80, 100]

  Heart        = ["Recovery", 80, 100]

  Anger        = ["Buzzer1", 80, 100]

  Sweat        = ["Fall", 80, 100]

  Cobweb       = ["Sand", 80, 100]

  Silence      = ["Silence", 80, 100]

  Lightbulb    = ["Stare", 80, 100]

  Zzz          = ["Sleep", 80, 100]

end

 

class Sprite_Character < Sprite_Base

  #--------------------------------------------------------------------------

  # * Start Balloon Icon Display

  #--------------------------------------------------------------------------

alias leum_balloonsoundfx_spritecharacter_start_balloon_swf5    start_balloon  

  def start_balloon

p(@balloon_id)

    unless $game_switches[balloonFX::Event_Switch_ID]    

case @balloon_id

  when 1

    RPG::SE.new(*BalloonFX::Exclamation).play   if BalloonFX::Exclamation[0]

  when 2

    RPG::SE.new(*BalloonFX::Question).play      if BalloonFX::Question[0]

  when 3

    RPG::SE.new(*BalloonFX::Music_Note).play    if BalloonFX::Music_Note[0]

  when 4

    RPG::SE.new(*BalloonFX::Heart).play         if BalloonFX::Heart[0]

  when 5

    RPG::SE.new(*BalloonFX::Anger).play         if BalloonFX::Anger[0]

  when 6

    RPG::SE.new(*BalloonFX::Sweat).play         if BalloonFX::Sweat[0]

  when 7

    RPG::SE.new(*BalloonFX::Cobweb).play        if BalloonFX::Cobweb[0]

  when 8

    RPG::SE.new(*BalloonFX::Silence).play       if BalloonFX::Silence[0]

  when 9

    RPG::SE.new(*BalloonFX::Lightbulb).play     if BalloonFX::Lightbulb[0]

  when 10

    RPG::SE.new(*BalloonFX::Zzz).play           if BalloonFX::Zzz[0]

    end

    leum_balloonsoundfx_spritecharacter_start_balloon_swf5

    end

  end  

end
It works as intended and plays sounds when the balloons pop up above the target character's head and in the console it counts the balloons from 1 to 10 and shows the graphics. This is what I want it to do when the event trigger is off.

 

When the event trigger is triggered in the game, however, and is turned on and you talk to the target character again it will repeatedly spam the first balloon so quickly that you do not see any graphics pop up above the event character's head (not what is intended), no sound will play (which is intended), and in the console you see only "1" (the first balloon's id) being spammed at an incredible rate as if there's a loop in place (not what is intended), but I'm not seeing the loop.

 

Any help would be greatly appreciated as I'm pretty confused on what exactly is happening... also how do I take screenshots to show further what I'm talking about? and I hope this was pretty clear as to what is going on and what I want the code to do.

 

Thanks in advance,

Leum.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top