What causes the stage not to end after the certain boss is defeated?

Bruce

Active member
Based on the manual,

boss {bi}

• Optional.
• If set to 0, nothing. If set to 1, the character is a boss. When a boss appears, the music will change to the boss music (if it was defined).
Killing all the boss characters in a level will kill all other enemies and also end the stage automatically (even if there are still unspawned
entities)


I even made this very simple stage to test with the filestream files with only 1 boss in the level and set it as boss 1.
I defeated the boss and the level did not end. tried and tried, but still the same results


levels.txt
Code:
noslowfx       1
hiscorebg     1
equalairpause 1
completebg  1

set    Testlevel
lives      3
credits    3
custfade   50
nosame     0
noshare    1
maxplayers 4
typemp     0
ifcomplete 0
Musicoverlap 1  

skipselect Dummy_P
#select data/select/select.txt

z    950 1060
file    data/levels/Testlevel.txt

end


TestLevel.txt
Code:
order    a b c
type         0
settime    0
notime        1
shadowcolor    1
direction    both
cameraoffset  0 256
noslow        1


# spawn1 {x} {z} {a}
spawn1  660 650 0  
spawn2  690 650 0  
spawn3  720 650 0  
spawn4  750 650 0  

light   190 -32


......
......

spawn   Satano_B 3
boss    1
health  2000
map 0
coords 1150 900
at 0

I am using 4.0+ build.
Can someone please explain what I am missing?
Thank you

Edited:
I just noticed that
the level ended when I switched the weapon after the boss is defeated:
Code:
void Switch_Weapon(int weaponNum)
{
    void self = getlocalvar("self");
    changeentityproperty(self, "weapon", weaponNum);
}

This doesn't make any sense. I shouldn't have to do anything to end the level after the boss is defeated!
 
Last edited:
Based on the manual,

boss {bi}

• Optional.
• If set to 0, nothing. If set to 1, the character is a boss. When a boss appears, the music will change to the boss music (if it was defined).
Killing all the boss characters in a level will kill all other enemies and also end the stage automatically (even if there are still unspawned
entities)


I even made this very simple stage to test with the filestream files with only 1 boss in the level and set it as boss 1.
I defeated the boss and the level did not end. tried and tried, but still the same results


levels.txt
Code:
noslowfx       1
hiscorebg     1
equalairpause 1
completebg  1

set    Testlevel
lives      3
credits    3
custfade   50
nosame     0
noshare    1
maxplayers 4
typemp     0
ifcomplete 0
Musicoverlap 1 

skipselect Dummy_P
#select data/select/select.txt

z    950 1060
file    data/levels/Testlevel.txt

end


TestLevel.txt
Code:
order    a b c
type         0
settime    0
notime        1
shadowcolor    1
direction    both
cameraoffset  0 256
noslow        1


# spawn1 {x} {z} {a}
spawn1  660 650 0 
spawn2  690 650 0 
spawn3  720 650 0 
spawn4  750 650 0 

light   190 -32


......
......

spawn   Satano_B 3
boss    1
health  2000
map 0
coords 1150 900
at 0

I am using 4.0+ build.
Can someone please explain what I am missing?
Thank you

Edited:
I just noticed that
the level ended when I switched the weapon after the boss is defeated:
Code:
void Switch_Weapon(int weaponNum)
{
    void self = getlocalvar("self");
    changeentityproperty(self, "weapon", weaponNum);
}

This doesn't make any sense. I shouldn't have to do anything to end the level after the boss is defeated!
The only way I remember that may stuck the "end level" event after the boss is defeated is an enemy spawn.

 
The only way I remember that may stuck the "end level" event after the boss is defeated is an enemy spawn.

I just removed everything and this is what I have in the level but still stuck:

Code:
music            data/music/GoW_Scorpion.ogg
bglayer            data/bgs/BrightSky.png     0.4 0 0 0   0 0 1 1    0 0   0 0 0 0 0
fglayer        data/bgs/SecretShire/SecretShire_Rear.png     -3000  0.23 0 0 0   0 0 1 1    1 0   0 0 0 0 0

panel            data/bgs/SecretShire/SecretShire_Main.png
#frontpanel        data/bgs/training/front.gif

maxtossspeed    1000
maxfallspeed    -400
gravity    -25

order    a b c
type         0
settime        0
notime        1
shadowcolor    1
direction    both
cameraoffset  0 256 
noslow        1

# spawn1 {x} {z} {a}
spawn1  660 650 0   
spawn2  690 650 0   
spawn3  720 650 0   
spawn4  750 650 0   



#==========================================================================
load FireWave2 3
load FlameTornado 3
load Leviathan_D 3
load RisingSkulls 3
load SecretShireWater 3
load Spawner4 3
#=========================================================================


spawn   Satano_B 3
boss    1
health  500
map 0
coords 1150 900
at 0

I picked the dummy char then load the new model and switch to this new model and change the char name with
Code:
    void player = getplayerproperty(P_Index, "entity"); 
    changeplayerproperty(P_Index,"name", charName);
    changeentityproperty(player, "model", charName, 1);
    changeentityproperty(player, "name", charName);

Maybe this causes the level to be stuck?
It still doesn't make sense because it doesn't matter who defeats the boss as long as the boss's health gets to 0 and dies, the level should end regardless.
 
Maybe this causes the level to be stuck?
Try to gradually remove the character/level/script codes to see when the issue starts. This way you can isolate the cause and develop a fix for it.
I change model/name properties in the SORX constantly but never had this kind of issue.
 
Try to gradually remove the character/level/script codes to see when the issue starts. This way you can isolate the cause and develop a fix for it.
I change model/name properties in the SORX constantly but never had this kind of issue.
If there is no other way, I'll have to do this to track it down, Thank you
 
Back
Top Bottom