Solved Local Branch error

Question that is answered or resolved.
I apologize for such a silly question, but I no longer have the strength to solve it on my own.

I have a level with two branches in the begins:
z 80 270
file data/Story/choice1.txt
branch WSD
z 80 270
file data/Story/WSD.txt
branch WSD2
z 670 670
file data/Story/WSD2.txt
z 230 370
file data/Story/stage6-3.txt
z 195 280
file data/Story/stage6-4.txt
In essence, these are two mini-games that lead to the same level. I use the «jumptobranch» to WSD to move the player to «stage6-3». But instead, the player gets into WSD2.
name WSDBr
type none
shadow 0
offscreenkill 4000

anim idle
@script

jumptobranch("stage6-3.txt", 0);
@end_script
delay 10
offset 1 1
frame data/chars/misc/empty.gif
I tried to use the same one «jumptobranch» to WSD2 but it has no effect. There is no error in the direction of "jumptobranch" or "endlevel", I have checked many times.
name StarWSD
facing 1
type endlevel
branch WSD
shadow 0
alpha 3

anim idle
loop 1
delay 14
offset 238 177
bbox 222 149 32 32
frame data/bgs/choice/StarBethlehem01.gif
frame data/bgs/choice/StarBethlehem02.gif
frame data/bgs/choice/StarBethlehem03.gif

Please tell me what to do?
 
Solution
I can see the error right away:
Code:
z       80 270
file    data/Story/choice1.txt
branch    WSD
z       80 270
file    data/Story/WSD.txt
branch    WSD2
z    670 670
file    data/Story/WSD2.txt
# branch is needed here to go to stage6-3 below
z       230 370
file    data/Story/stage6-3.txt

You need to define a branch name like this:
Code:
z       80 270
file    data/Story/choice1.txt
branch    WSD
z       80 270
file    data/Story/WSD.txt
branch    WSD2
z    670 670
file    data/Story/WSD2.txt
branch S63
z       230 370
file    data/Story/stage6-3.txt
z    195 280
file    data/Story/stage6-4.txt

Then in WSD.txt force player to go to S63 after completion with this script:
Code:
@script
void main()
{
  jumptobranch("S63"...
I can see the error right away:
Code:
z       80 270
file    data/Story/choice1.txt
branch    WSD
z       80 270
file    data/Story/WSD.txt
branch    WSD2
z    670 670
file    data/Story/WSD2.txt
# branch is needed here to go to stage6-3 below
z       230 370
file    data/Story/stage6-3.txt

You need to define a branch name like this:
Code:
z       80 270
file    data/Story/choice1.txt
branch    WSD
z       80 270
file    data/Story/WSD.txt
branch    WSD2
z    670 670
file    data/Story/WSD2.txt
branch S63
z       230 370
file    data/Story/stage6-3.txt
z    195 280
file    data/Story/stage6-4.txt

Then in WSD.txt force player to go to S63 after completion with this script:
Code:
@script
void main()
{
  jumptobranch("S63", 0);
}
@end_script
coords    400 195
at    0

Yes, you don't need entity to run simple script like the above.

HTH
 
Solution
Back
Top Bottom