Solved Stagenumer wrong in complete screen

Question that is answered or resolved.

dantedevil

Well-known member
I have problems with the stagenumber.
When finish all three levels of the first mission, the complete screen say:
Stage 2 complete

Code:
#-----------MISSION 1--------------

z 225 270 225 #1-1
file    data/levels/stage1-1.txt

z 175 270 175  #1-2 
file    data/levels/stage1-2.txt

z 190 255 190  #1-3
file    data/levels/stage1-3.txt
next
#-----------MISSION 2--------------

z 245 270 245  #2-1
file    data/levels/stage2-1.txt

z 230 270 230 #2-2
file    data/levels/stage2-2.txt
next
#-----------MISSION 3--------------

z 195 270 195 #3-1 
file    data/levels/stage3-1.txt

z 205 270 205 #3-2
file    data/levels/stage3-2.txt
next

#-----------MISSION 4--------------

z 230 270 230 #4-1 
file    data/levels/stage4-1.txt

z 235 270 235 #4-2 
file    data/levels/stage4-2.txt
next

#-----------MISSION 5--------------

z 215 270 215 #5-1
file    data/levels/stage5-1.txt

branch    Stage5-2
z 233 270 233 #5-2
file    data/levels/stage5-2.txt

z 205 270 205 #5-2-1
file    data/levels/stage5-2-1.txt

branch    Stage5-3
z 180 270 180 #5-3
file    data/levels/stage5-3.txt

branch    Stage5-3-1
z 220 270 220 #5-3-1
file    data/levels/stage5-3-1.txt

branch    stage5_black
z 238 270 238
file    data/levels/stage5_black.txt
next


#-----------MISSION 6--------------

branch    Stage6-1
z 218 270 218 #6-1
file    data/levels/stage6-1.txt

z 163 270 163 #6-2
file    data/levels/stage6-2.txt

branch    Stage6-3
z 235 270 235 #6-3
file    data/levels/stage6-3.txt

z 230 270 230 #6-4
file    data/levels/stage6-4.txt
next
#-----------------------------------

Try setting stagenumber 1 in the three level but not works.
In all levels set the specific stagenumber, but if the first mission shows the wrong number, all the next levels follow the same way.
 
Last edited:
Solution
Finally found the problem!

One of the fonts (font4 /  MKmythologies) is wrong.

In the fourth line say:

1234567890  > Thats wrong

Now I corrected and functioning properly.
0123456789 > This the right
Yes but is off with the #

Here you can see:

Code:
hiscorebg 1

noslowfx		1

loadingbg	1 -1113 -1194 100 -1138 -1220
loadingbg2 1


#-------------------------------------------------------------
maxplayers 3
p1smenu 0  1   -20 -20 
p2smenu 0 -272 -20 -20 
p3smenu 0 -544 -20 -20 

timeloc 373 2 26 26 0


lbarsize  99 5 1 1 0 -9999 -9999 -9999 -9999
mpbarsize  99 4 1 0 0 -9999 -9999 -9999 -9999





p1life      32   14
p1lifex    132   19 4
p1lifen    140   18 4
p1namej     40    3 40  27  40  17 4
p1score     40    3 105  3  115  2 4
p1icon       1    1
p1mp        28   19
e1icon       1   21
e1life      28   38
e1name      36   28 4


p2life     183   14
p2lifex    283   19 4
p2lifen    291   18 4
p2namej    191    3  191 27 191  17 4
p2score    191    3  256  3 266  2 4
p2icon     152    1
p2mp       179   19
e2icon     152   21
e2life     179   38
e2name     187   28 4


p3life     334   14
p3lifex    434   19 4
p3lifen    442   18 4
p3namej    342    3  342 27 342  17 4
p3score    342    3  407  3 417  2 4
p3icon     303    1
p3mp       330   19
e3icon     303   21
e3life     330   38
e3name     338   28 4

#----------------- MORTAL KOMBAT The Chosen One----------------#




set	NORMAL
typemp 0
custfade 100
lives   3
credits 99
nosame    1
cansave	2
completebg    1



#file data/levels/scenes/intro/intro.txt
#scene	data/scenes/intro3.txt



#-----------MISSION 1--------------

z 225 270 225 #1-1
file	data/levels/stage1-1.txt

z 175 270 175  #1-2  
file	data/levels/stage1-2.txt

z 190 255 190  #1-3 
file	data/levels/stage1-3.txt
next
#-----------MISSION 2--------------
 
This is the end of stage 1-3:
Code:
#---------------------------------


group	1 1
at	1791

spawn  story
alias   stage_1-3c
at    1791

spawn	endstage0
coords	-500 270
at    1791

spawn	endstage2
coords	240 240 250
@script
void main()
{
  changeopenborvariant("slowmotion", 0);
  setindexedvar("Dead", NULL());
}
@end_script
at    1791

blockade 1791
at    1791

The enstage0 is the file type endlevel, but in this case only use to the level not finish.
For that the ensdtage0 is spawn out of the screen.

The ensdtage2 work like a custom endlevel:
Code:
name	 Endstage2
type	 none
shadow   0
nolife   1

animationscript data/scripts/atkallp.c 

load Endstage0

anim idle
        followanim 1
        followcond 1
	loop	1 4
	delay	6
	offset	19 35
        jumpframe 0 0.1 0
        landframe 2
	frame	data/chars/misc/endcoin01.png
	delay	999
	frame	data/chars/misc/endcoin01.png
	delay	20
        sound   data/sounds/victory.wav
	frame	data/chars/misc/endcoin01.png
	delay	8
        hitfx   data/sounds/empty.wav
        noreflect 1
	attack	20 20 1 1 0 0 1 1 0
	frame	data/chars/misc/endcoin01.png
	frame	data/chars/misc/endcoin02.png
	frame	data/chars/misc/endcoin03.png
	frame	data/chars/misc/endcoin04.png
	frame	data/chars/misc/endcoin05.png
	frame	data/chars/misc/endcoin06.png
	frame	data/chars/misc/endcoin07.png
	frame	data/chars/misc/endcoin08.png
	frame	data/chars/misc/endcoin09.png
	frame	data/chars/misc/endcoin10.png
	frame	data/chars/misc/endcoin11.png
	frame	data/chars/misc/endcoin12.png
	frame	data/chars/misc/endcoin13.png
	frame	data/chars/misc/endcoin14.png
	frame	data/chars/misc/endcoin15.png
	frame	data/chars/misc/endcoin16.png
	frame	data/chars/misc/endcoin17.png
	frame	data/chars/misc/endcoin18.png
	frame	data/chars/misc/endcoin19.png


anim follow1
	delay	30
	offset	1 1
        @cmd    spawn01 "Endcoin" 0 0 0
	frame	data/chars/misc/empty.png
        @cmd  damage_all_players 0 0 -100 "ATK_NORMAL52"
	frame	data/chars/misc/empty.png
        @cmd    anichange "ANI_FOLLOW2" 0
	frame	data/chars/misc/empty.png

anim follow2
	delay	110
	offset	1 1
	frame	data/chars/misc/empty.png
	load		complete
	subentity	complete
	spawnframe	2 0 -4 0 1
	frame	data/chars/misc/empty.png
	delay	550
	frame	data/chars/misc/empty.png
        @cmd    anichange "ANI_FREESPECIAL1" 0
	frame	data/chars/misc/empty.png

anim freespecial1
	delay	2
	offset	1 1
	frame	data/chars/misc/empty.png
        @cmd    spawn01 "Endstage0" 0 0 0
 	frame	data/chars/misc/empty.png

Whith this file I make the players shows the win animation and then spawn at the end endstage0 to finish the level.
All my method works perfect, the only problem seems the stagenumber.

It's possible set the stagenumber via script?
 
I think you should just end the level with script instead of spawning that item.

Reference
http://www.chronocrash.com/forum/index.php?topic=55.0

OTOH you can only check the current stage number but not alter it.
 
Bloodbane said:
dante, have you tried tricking OpenBoR be setting stagenumber 1 unit less? e.g for stage 2, you set stagenumber 1 instead

So you say this:
stage1-1  - set  stagenumber 0
stage1-2  - set  stagenumber 0
stage1-3  - set  stagenumber 0

stage2-1  - set  stagenumber 1
stage2-2  - set  stagenumber 1
 
Finally found the problem!

One of the fonts (font4 /  MKmythologies) is wrong.

In the fourth line say:

1234567890  > Thats wrong

Now I corrected and functioning properly.
0123456789 > This the right
 
Solution
Back
Top Bottom