Ignoring "next" in levels.txt by script

ABK

Well-known member
Any way to do this? I have labirynth stage and normally its like this ,it has "next" after labir.txt so it goes back to map:
Code:
branch labir
scene	data/scenes/heman2.txt
z 80  1600   
file	data/levels/labir.txt
next
z 25 620
file	data/levels/map.txt
scene	data/scenes/hint2.txt
scene	data/scenes/cred.txt
z 25 620
file	data/levels/mapr.txt
end
So it has NEXT afger you finish it, but in the stage theres item with timer, and if timer runs out then script runs which is :
Code:
				@script
                void self = getlocalvar("self");
 	if( frame == 1 ){
    	settextobj(1,	290 , 420 , 0, -1, "FIND YOUR WAY OUT BEFORE TIME RUNS OUT !" , openborvariant("elapsed_time")+2500);
	}
    	if( frame == 3 ){
    	settextobj(1,	430 , 230 , 3, -1, "YOU FAILED !!!" , openborvariant("elapsed_time")+2500);
jumptobranch("mapc", 0);
	}
    	if( frame == 4 ){
jumptobranch("mapc", 1);
	}
	@end_script
So this script should immediately jump to branch "mapc" which is this :
Code:
branch mapc
z 25 620
file	data/levels/map.txt
scene	data/scenes/hint2.txt
scene	data/scenes/cred.txt
end
As you see it doesnt have NEXT but it still shows "stage complete" screen when jumping to MAPC branch, how i can make it so it doesnt show "Stage complete" screen, i want to incorporate the feel of failure and stage complete isnt the best way to do it  ;D
Any way to setup everything so "stage complete" wont show when timer runs out ?
 
Have you tried adding scene after labir.txt? it might trick engine not to play next when labir.txt is completed (in any way)

If that doesn't work, you can make a fake quick level like this:

Code:
background	data/bgs/light2.png
panel		data/chars/misc/0empty.gif none none
fglayer		data/bgs/light2.png 100 0 0 0 0 0 0 -1 1 1
order		a
scrollspeed	0
settime		0 
notime		1
nofadeout	1
type		2 0 0


spawn	delay
@script
void main()
{
    jumptobranch("Lanjut",1);
}
@end_script
health	100
coords	480 500
at	0

and place it right next to labir.txt like this:

file data/levels/labir.txt
file data/levels/quick.txt
next

quick.txt is as name implies, is a fake level played very quick almost it's not there
 
Ive tried it and it just cancels next so it doesnt appear when stage is clearedd properly so its like if i didnt use next at all.
So , maybe theres some way to bring level complete screen by script somehow ?
Otherwise i might add text like " 1000 points bonus" inside of the level when its completed and add points by script and not use "next" at all in labir branch.
 
Back
Top Bottom