Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
haruko haruhara

how can i put two midis in a level

Question

Posted (edited)

my invasion wad is made with skulltag im making my map04 with skulltag an i want to put two midis in the level so it will be more impressive but it won.t work  here is the code

 

 


Script 1 OPEN
{ SetMusic("D_BETWEE");
    while (( GetInvasionWave( ) != 2 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(2);

Script 2 OPEN
{
    while (( GetInvasionWave( ) != 1 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
thing_remove(1);

Door_Raise(1,100,0);

}

Script 3 OPEN
{
    while (( GetInvasionWave( ) != 3 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(3); 

Door_Open(2,100);

}
Script 4 OPEN
{ SetMusic("D_SLIPKN");
    while (( GetInvasionWave( ) != 4 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(4); 

Door_Raise(3,100,0);
Print(s:"Spawn closed due to nukage overflow.. New spawns created");
Delay(1);
Door_Close(2,100);
}
Script 5 OPEN
{
    while (( GetInvasionWave( ) != 5 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(5) ; 


        
      
       
Door_Raise(4,100,0);
Floor_LowerToNearest(6,50);

Script 6 OPEN
{
    while (( GetInvasionWave( ) != 6 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(6);


   {SetMusic("BOSS02");}
    while (( GetInvasionWave( ) != 7 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(7);


        
             
        

Door_Raise(7,100,0);
Thing_Remove(51);
SetMusic("BOSS01");}

 

please help me :(

Edited by haruko haruhara

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0

Could be because script 1 and script 4 are changing the music at the same time? by the way why are using a separate script for each WHILE loop?

Share this post


Link to post
  • 0
Posted (edited)

Edit: I've looked with more attention to your script and I've found another error. In your 6th script you've placed the first setmusic code in {} (don't know how to call them in english sorry). This is weird and surely is an error.

 

In order to make your script work you have to place ALL the code inside the

 

SCRIPT 1 OPEN

{

 

Structure. I've fixed also this in the code at the bottom of this reply.

Also why are the brackets in Getinvasionwave void?

__________________________

You can write all this code in only one script, because you have the while loops that blocks the execution of your script in specific points, so you don't have to worry about something that happens in the wrong moment. If you write a single script you use less resuorces from your pc (the script has to loop only in one while and not in 6) and also your music will be set correctly.

 

Probably in your case is sufficient to remove all the 

 

Script x OPEN

{

 

}

 

From your code, leaving only the first one that will contain all the scripts.

A fixed version of your code follows (untested and done in 2 minutes so be careful to use this, be sure to have a backup)

Spoiler

Script 1 OPEN
{ SetMusic("D_BETWEE");
    while (( GetInvasionWave( ) != 2 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(2);
while (( GetInvasionWave( ) != 1 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
thing_remove(1);

Door_Raise(1,100,0);

while (( GetInvasionWave( ) != 3 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(3); 

Door_Open(2,100);

 SetMusic("D_SLIPKN");
    while (( GetInvasionWave( ) != 4 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(4); 

Door_Raise(3,100,0);
Print(s:"Spawn closed due to nukage overflow.. New spawns created");
Delay(1);
Door_Close(2,100);

    while (( GetInvasionWave( ) != 5 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(5) ; 


        
      
       
Door_Raise(4,100,0);
Floor_LowerToNearest(6,50);
    while (( GetInvasionWave( ) != 6 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(6);


   SetMusic("BOSS02");
    while (( GetInvasionWave( ) != 7 ) || ( GetInvasionState( ) != IS_COUNTDOWN ))
        delay( 1 );
        thing_remove(7);


        
             
        

Door_Raise(7,100,0);
Thing_Remove(51);
SetMusic("BOSS01");}

 

Edited by Simomarchi

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×