[SOLVED] About branch

O Ilusionista

Captain 100K
Hi there. I need some help setting some branches.

Here are my level and branch setting:
#----------------------------avbase
z 170 239 160
file data/levels/avbase.txt



branch bonus02

#----------------------------glass bonus
z 175 239 160
file data/levels/bonus02.txt

#----------------------------avbase
z 170 239 160
file data/levels/avbase.txt




branch heliport

#----------------------------heliport bonus
z 110 182 0
file data/levels/portobonusgame.txt



branch avbase
#----------------------------avbase
z 170 239 160
file data/levels/avbase.txt

Basically, I have a main stage where you can choose to where you go (avbase). There are two branches: bonus02 and heliport (which I choose by touching branch itens inside the stage). If I enter on bonus02, after beating the stage, I return to main stage (avbase). I can enter on it again and again. This is ok.

When I enter on the other branch (heliport) and beat the stage, I return to avbase, which is okay. But If I try to enter on the same branch again...I get a Hall of Fame screen. No error on the log.

Any clues?

SOLVED: You need to use a stage BEFORE the first branch
z 170 239 160
file data/levels/avbasefix.txt # dummy



branch avbase
#----------------------------avbase
z 170 239 160
file data/levels/avbase.txt



branch heliport

#----------------------------heliport bonus
z 110 182 0
file data/levels/portobonusgame.txt
z 170 239 160
file data/levels/avbase.txt



branch bonus02

#----------------------------glass bonus
z 175 239 160
file data/levels/bonus02.txt
z 170 239 160
file data/levels/avbase.txt
 
I'm not even a baby near your level, but maybe I can help(The mod I'm doing is full of branches, none of them bugged) I think this way: Do not let the level finish when you defeat the boss, as soon as the boss dies, send him an item branch, or a branch (with the place you Want to come back) appear.

If the boss dies and the stage ends, it will always branch to the next stage (the stage you dont want go)...About the error without logging there I do not know. Maybe doing what I told you (to specify the branch in the stage, to let go of automatic to the next level) may be that the error disappears.

BR:
Eu não sou nem um bebe perto do seu nivel, mas talves eu possa ajudar(O mod q estou fazendo é cheio de branchs, nenhum deles bugou). Penso assim: Não deixe o level terminar quando você derrotar o chefe, assim que o chefe morrer mande ele deixar um branch de item, ou um branch (com o lugar que você quer voltar) aparecer. 

Se o chefe morrer e o stage acabar, sempre vai dar branch para o proximo stage (esse proximo que você não quer)... Sobre o erro sem log ai eu não sei. Talves fazendo o que te falei (de especificar o branch no stage, ao ives de deixar ir automatico para o proximo level) pode ser que o erro desapareça.
 
I'm not even a baby near your level,
Nah, there is not such thing :)

Thanks, but in my case is not a normal level, its a bonus level, so it will end once all the obstacles are destroyed or the time runs out.
I ended not let the player return to the base to choose another bonus game, for now.
 
Do you have the Map demo where you can go to which branch endlessly? You can make avbase stage as a dummy level and make reference using it.

Example in levels.txt from map demo:

Code:
set		Map
typemp		0
custfade	100
musicoverlap	0
lives		99
credits		1
noshare		0
cansave		2
continuescore	2
z		140 210 140
file		data/levels/begin.txt
branch		Map
z		20 600 20
file		data/levels/map.txt
branch		F1
z		140 210 140
file		data/levels/forest1.txt
branch		F2
file		data/levels/forest2.txt
branch		F3
file		data/levels/forest3.txt
branch		G1
z		120 210 120
file		data/levels/gunung1.txt
branch		R1
z		160 210 160
file		data/levels/room1.txt
branch		T1
z		100 210 100
file		data/levels/tavern1.txt
z		20 600 20
file		data/levels/map.txt # dummy level

However, in the dummy level, you need to make globalvars and set them in each end of the levels (heliport and bonus02).

If it doesn't work, how about using something like LevelEnd entity like this?

Code:
name       LevelEnd
type       none
antigravity     100

anim idle
@script
    void self = getlocalvar("self");
    char Name = getentityproperty(self,"name");

    if(frame == 1){
      jumptobranch(Name, 1);
    }
@end_script
   delay   1  #<--- defines how long it takes before level ends
   offset   1 1
   frame   data/chars/misc/empty.gif
   frame   data/chars/misc/empty.gif

I think you can set in a level txt in this.

In avbase:

Code:
spawn   LevelEnd
alias	bonus02
coords  300 239
at      0

spawn   LevelEnd
alias	heliport
coords  460 239
at      0

In each level for moving back to avbase especially heliport:

Code:
spawn   LevelEnd
alias	avbase
coords  0 920 350
at      2500

How do you want branches to end?
 
That happened to me (remember Akuma?)

It seems that branches have a small bug. If nothing comes after a branch, boom! Hall of fame. If something comes after it, you'll eventually go for that branch.

In SFFGold Plus, if you get the "upper" route (Won Won/Retu), beat Bison, then load the savestate, you'll get to face Akuma.
If you beat Akuma, then load the savestate... you'll go BACK TO STAGE 4.

And that happens because the branches are declared in that same order: stage 4-5A, Akuma, stage 4-5B

I just don't know what in the world makes openBOR look "after" a branch. My hint is to declare another avbranch before anything else - even stage 1.
 
@Ilu: Setting dummy level after last level is sufficient to stop engine from going to hall of fame after accessing branch

maxman said:
However, in the dummy level, you need to make globalvars and set them in each end of the levels (heliport and bonus02).

No, you got it wrong. That dummy level isn't even played so there's no need to set anything there. That's why any level can be declared as dummy level

Don Drago said:
If something comes after it, you'll eventually go for that branch.

Really? did that happen with latest build?

Don Drago said:
In SFFGold Plus, if you get the "upper" route (Won Won/Retu), beat Bison, then load the savestate, you'll get to face Akuma.

Oh that's problem with loading state, not branch itself. There needs to be update to the engine to refuse loading a saved game if loading hits end

theoz said:
If the boss dies and the stage ends

There is boss vs branch bug and I don't know if it's fixed or not
However, there is another way to replicate boss death FX with script to overcome this issue :)
 
@Ilu: Setting dummy level after last level is sufficient to stop engine from going to hall of fame after accessing branch
That was exactly what I did and didn't worked :(
I checked your map demo, and my branch settings follows the same logic of you.

Edit: I made it work. The trick is: you need to have a stage BEFORE the first branch, as BB have in Map 6 demo.
This is the setup:
z 170 239 160
file data/levels/avbasefix.txt # dummy



branch avbase
#----------------------------avbase
z 170 239 160
file data/levels/avbase.txt



branch heliport

#----------------------------heliport bonus
z 110 182 0
file data/levels/portobonusgame.txt
z 170 239 160
file data/levels/avbase.txt



branch bonus02

#----------------------------glass bonus
z 175 239 160
file data/levels/bonus02.txt
z 170 239 160
file data/levels/avbase.txt

Thanks everyone.
 
Back
Top Bottom