Mystic Software Forums

Mystic Software => General Discussion => Topic started by: Aminaga on October 17, 2004, 03:54:46 PM

Title: (no subject)
Post by: Aminaga on October 17, 2004, 03:54:46 PM
Okay, who in this forum knows how to make a battle program where you can have your player be killed in a battle, but the story goes on still without getting "Game Over!" Please, I'm desperate! Well maybe not, but still, I N-E-E-D  H-E-L-P!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Title: (no subject)
Post by: Xorlak on October 18, 2004, 08:15:58 PM
Unfortunately, that's not possible with the default battle system.  I ran into this problem when I was doing the first version of Dark Age.  As sort of a way around, I made a story sequence that looked like a battle: the characters "attacked" the enemy automatically before getting blown away (heh...).  Not exactly the same as controlling the characters before losing, but it gives a similar effect.

Hmmm...

Actually I just had an idea...  Try setting this as your "game over" program in the main file editor:

Code: [Select]
#if(loss_program$="")
{
  #run("GameOver.prg") *This is your normal loss program
}
#if(loss_program$~="")
{
  #run(loss_program$)
}

Now try setting loss_program$ to the name of the program you want to run when the player loses, right before the battle, i.e.

#loss_program$="defeated_by_dragon.prg"
#fightenemy( ... )

I'm not sure it that'll work (haven't messed with the default battle system in years), so let me know!
Title: (no subject)
Post by: Asimir on October 18, 2004, 09:09:59 PM
It is possible, because Blob Dude did it in Chicket Hunt.
That may well be the way how.
Title: (no subject)
Post by: Zeros' on October 18, 2004, 09:28:07 PM
If he did indeed do it, you can just look through the program files till you find it.
Title: (no subject)
Post by: Aminaga on October 19, 2004, 08:31:33 AM
Okay, I'll see what I can do. If anyone by a small chance happens to know a better way to do this better then Xorlak(I doubt that) or Blob Dude(who must have learned it from the ultimate programmer), then post it!!!!!!!!!!!...

Preatty please? Smile

30 minates later...

Xorlak said:

---------------------------------------------------------------------------------------------

Actually I just had an idea... Try setting this as your "game over" program in the main file editor:

CODE#if(loss_program$="")
{
#run("GameOver.prg") *This is your normal loss program
}
#if(loss_program$~="")
{
#run(loss_program$)
}

Now try setting loss_program$ to the name of the program you want to run when the player loses, right before the battle, i.e.

#loss_program$="defeated_by_dragon.prg"
#fightenemy( ... )

I'm not sure it that'll work (haven't messed with the default battle system in years), so let me know!

----------------------------------------------------------------------------------------------

Apparently, it did nothing! Nothing but the programmng I already have in the "Game Over" program I made myself. NOOOOOOOOOOOO!
Title: (no subject)
Post by: Dude Man on October 19, 2004, 03:20:16 PM
Try downloading Chickit Hunt and then go mimic the program Blob Dude used in the battle.

I tried doing that myself in The Black Walkway, for the gym battles, but that did not work. But I'm going to have something like that in the remake since my skills have improved.

What you could do (allthough it might suck) would be to change the charactors into the bad guys and the bad guys into the charactors for just that battle and make the enemies die in one hit or so.
Title: (no subject)
Post by: AlienDude on October 19, 2004, 07:14:22 PM
HMmm i got the TK back a couple of days ago *lots of jumping for joy* , good first challenge...  should have it by friday i hope.
Title: (no subject)
Post by: Dont_Think_So on October 20, 2004, 11:00:11 PM
Actually, this is something I mention over and over but never really got off my lazy arse to write a tutorial.

Dont_Think_So's step-by-step guide to special gamovers:

(really need to think of a better title).

1) If you're using TK2, find some sort of read-write plugin, and set it up in your game. If using TK3, skip to step 3.

2) Study how the plugin works; because of the difference between plugins, syntax may be different.

3) Set the variable "supposedtolose!" to 1 before entering the fight.

4) Set the following as your game over code.

Code: [Select]
if(supposedtolose!==0)
{
Colorrgb(0,0,0)
Fade(4)
Colorrgb(255,255,255)
fontsize(20)
Text(10,10,"GAME OVER")
Delay(3)
*Change this if you want a different look.
}

if(supposedtolose!==1)
{
OpenFileOutput("SkipBattle.txt","Misc")
FilePrint("SkipBattle.txt","If you see this, something went wrong. Don't worry, next time you open the game, you will continue.")
CloseFile("SkipBattle.txt")
Save("Reload.pnu")
}

5) Add the following lines to the top of your start menu:

Code: [Select]
OpenFileInput("SkipBattle.txt","Misc")
Skip$ = FileInput("SkipBattle.txt")
CloseFile("SkipBattle.txt")

if(Skip$~="")
{
OpenFileOutput("SkipBattle.txt","Misc")
CloseFile("SkipBattle.txt")
Load("Reload.pnu")
Send("Start.brd",10,5,1) *You may wish to change that...
MWin("Why don't you just go back to where you belong?")
Wait()
Mwincls()
}


Now, I think I should explain just what exactly is going on here:

When you lose the battle, the game over program kicks in. It sees that you were supposed to lose the battle, so it writes into a file (that way it will remember after the  variables are wiped when it resets), then saves the current state of the game.

Then the game starts over. The start.prg sees that the file has been written to, so it "erases" the note, then loads the saved file. After that, you are sent to a board and dialogue appears.


NOTE: None of the above code was NOT tested in TK3, though I know the concept works in TK2.

EDIT: Errm, that was supposed to say "NOT".
Title: (no subject)
Post by: Aminaga on October 21, 2004, 04:36:31 PM
Hmmm... I guess if I edited it a little myself, I believe it might work.

Thanks! Smile