[ 3 posts ]  Reply to topicPost new topic 
Author Message
 [zz]
 Post subject: Second jingle wont interrupt first jingle
PostPosted: Tue Jan 03, 2017 6:10 am 
User avatar
I, Papyrus, am awesome!
Member
[*]
[*]
[*]
Hello again,
so there's a problem I have: When I hit an invincibility monitor and then hit a speed sneaker monitor while being invincible, the invincibility theme just restarts instead of playing the speed sneakers theme.
And the speed sneakers theme wont play even when the invincibility wears off, as it plays the level theme instead.
And when the speed sneakers wear off like that, the level theme restarts as if the speed sneakers theme did play (even though it didn't).
Here's the code (inside the Step Event of the object that handles all music and jingles):
Code:
/* Speed Sneaker */
if(instance_exists(par_player))
{
 if(instance_exists(global.main_player))
 {
 if(global.main_player.speed_sneakers_timer > 1)
  {
   if not(FMODInstanceIsPlaying(sneakersong)) and sneaker_already_played = false
    {
     //caster_stop(caster_handle);
     //caster_play(speed_sneaker_jingle,caster_volume,caster_pitch)
     FMODInstanceStop(caster_handle);
     FMODInstanceStop(invincibilitysong);
     FMODInstanceStop(invincibility_jingle);
     sneakersong = FMODSoundPlay(speed_sneaker_jingle);
     sneaker_already_played = true;
     break;
    };
   if not(FMODInstanceIsPlaying(speed_sneaker_jingle)) and sneaker_already_played = false
    {
     //caster_stop(caster_handle);
     //caster_play(speed_sneaker_jingle,caster_volume,caster_pitch)
     FMODInstanceStop(caster_handle);
     FMODInstanceStop(invincibilitysong);
     FMODInstanceStop(invincibility_jingle);
     sneakersong = FMODSoundPlay(speed_sneaker_jingle);
     sneaker_already_played = true;
     break;
    };
  };
  else if(global.main_player.speed_sneakers_timer == 1)
   {
    //if(FMODInstanceIsPlaying(sneakersong))
     //{
      //caster_stop(speed_sneaker_jingle)
      FMODInstanceStop(sneakersong);
      FMODInstanceStop(speed_sneaker_jingle);
      sneaker_already_played = false;
      //caster_loop(caster_handle,caster_volume,caster_pitch)
      current_song = FMODSoundLoop(caster_handle);
     //};
   };
  };
};

/* Invincibility */
if(instance_exists(par_player))
{
 if(instance_exists(global.main_player))
 {
 if(global.main_player.invincibility_timer != 0 && global.main_player.invincibility = 1 && global.main_player.super_state == false)
  {
   if not(FMODInstanceIsPlaying(invincibilitysong))
    {
     //caster_stop(caster_handle);
     //caster_stop(speed_sneaker_jingle);
     //caster_loop(invincibility_jingle,caster_volume,caster_pitch)
     FMODInstanceStop(caster_handle);
     FMODInstanceStop(sneakersong);
     FMODInstanceStop(speed_sneaker_jingle);
     invincibilitysong = FMODSoundLoop(invincibility_jingle);
     break;
    };
  };
  else if(global.main_player.invincibility_timer == 0)
   {
    if(FMODInstanceIsPlaying(invincibilitysong))
     {
      //caster_stop(invincibility_jingle)
      //caster_loop(caster_handle,caster_volume,caster_pitch)
      FMODInstanceStop(invincibilitysong);
      current_song = FMODSoundLoop(caster_handle);
     };
   };
  };
};

Just so you know, just hitting the speed sneaker monitor while not being invincible does produce the speed sneaker theme, just as it should.
So yeah, I would be glad if someone could help me out on that nutcracker...

_________________
My games:
Spoiler:

What I also support:
Spoiler:
 
Top
Offline 
 User page at mfgg.net
 
 [zz]
 Post subject: Re: Second jingle wont interrupt first jingle
PostPosted: Sat Jan 14, 2017 5:42 am 
User avatar
I, Papyrus, am awesome!
Member
[*]
[*]
[*]
Sorry for the bump, but I really need help there...

_________________
My games:
Spoiler:

What I also support:
Spoiler:
 
Top
Offline 
 User page at mfgg.net
 
 [zz]
 Post subject: Re: Second jingle wont interrupt first jingle
PostPosted: Tue Jan 24, 2017 3:26 am 
User avatar
I, Papyrus, am awesome!
Member
[*]
[*]
[*]
Sorry for another bump, but I really really need help right now.
Like I already tried multiple times, and I have no idea why the problem still persists.
And I really have to solve that problem, otherwise I cannot continue. So please help me already...

_________________
My games:
Spoiler:

What I also support:
Spoiler:
 
Top
Offline 
 User page at mfgg.net
 
« Previous topic | Next topic »
Display posts from previous:  Sort by  
 [ 3 posts ]  Reply to topicPost new topic 


Who is online

Users browsing this topic: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group