Crimsondeath
Active member
Hi to everyone
.
It's posible to do something like the Final Fight Omake ending?
It's a scene that only appears if player beats the game without losing a credit.
How can I do it with OpenBOR Scripts?
I haven't found a method to count lost credits in the manual.
Edit: Ok I could count the player respawn with join#.c and store it into a save file
. The globalvars starts at 0 for both players, if the player 1 or 2 respawns their respective variables sets 1 for all the game from now on. But I need to show the scene if the globalsvars are less than 1.
Can I use conditions in the level.txt script?
.
Edit 2: After many tries I solved by myself the issue, using the update.c script and an "empty scene" as trigger event
:
Update.c code:
Sorry to bother everyone with this post, If you are an admin/mod you can delete it :x .
Thanks to everyone anyway
.
It's posible to do something like the Final Fight Omake ending?
It's a scene that only appears if player beats the game without losing a credit.
How can I do it with OpenBOR Scripts?
Edit: Ok I could count the player respawn with join#.c and store it into a save file
Can I use conditions in the level.txt script?
Code:
....
# --- STAGE 6 ---
scene data/scenes/stage6_intro.txt
z 168 284 168
file data/levels/stage6-a.txt
z 181 288 181
file data/levels/stage6-b.txt
file data/levels/stage6-c.txt
z 136 320 184
file data/levels/stage6-d.txt
z 200 288 88
file data/levels/stage6-e.txt
next
scene data/scenes/scene6.txt
# ---------------
#<--- if global vars are "0" ? Show Omake Ending
scene data/scenes/credits.txt
scene data/scenes/omakeending.txt
end
#<--- if global vars are "1" ? Show Normal ending
scene data/scenes/credits.txt
end
Edit 2: After many tries I solved by myself the issue, using the update.c script and an "empty scene" as trigger event
Update.c code:
C#:
void oncreate() {
...
setglobalvar("player1respawn", 0);
setglobalvar("player2respawn", 0);
}
void main (){
...
if(openborvariant("current_scene") == "data/scenes/events/check_credits.txt" && getglobalvar("player1respawn") == 1 || openborvariant("current_scene") == "data/scenes/events/check_credits.txt" && getglobalvar("player2respawn") == 1){
jumptobranch("normal_ending", 1);
}
}
Sorry to bother everyone with this post, If you are an admin/mod you can delete it :x .
Thanks to everyone anyway
Last edited: