Jump to content

Photo

Life, continue, game over?


  • Please log in to reply
5 replies to this topic

#1 CastChaos

CastChaos

    Deified

  • Members

Posted 08 December 2007 - 04:57 AM

So, I'm not into scripting until stable 2.5 is released and I use 2.10, but the Link head by Linkus gave me an idea.

Could one make a script that mantains a "life - game over" concept? Just like in any platformer, for example like in Megaman. There's a life counter that grows when Link gets the 1up item. The counter goes down when the player dies and saves/continues (but not retries). If there are zero lives left, the player can only retry upon death.

Even if scripts can't control the game over screen, it can be done somehow, can't be? Of course, it would be weird in any already existing game, but a good sidescroller could use it. Not?

#2 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 10 December 2007 - 09:59 PM

This was easily doable, but looking through std.zh it seems the devs have removed those.....wtf?
....maybe they never were in there. Well try this, if it works then i'll write the script for you.
CODE

ffc script die_you_mf_bastard{
void run(){
while(true){
if(Game->NumDeaths > 0){Link->HP--;}
Waitframe();
}
}
}


set to "carry over" and you're golden. Just Die once, and if it works you'll know.


p.s. - speaking of megaman, I'm halfway finished with a NES Megaman tileset. It would be the first "scripted" sidescroller set that I know of where everything is included. yada,yada- besides Zodiac. You wouldn't be wanting to make a Megaman quest, would you?

#3 CastChaos

CastChaos

    Deified

  • Members

Posted 11 December 2007 - 05:21 PM

Ok, I will try it, but now it's sleep time. As for a Megaman quest, no, I won't have a Megaman quest as a main project in the next few years and it's unlike I start another side project in this year.

EDIT: But remember, I brought it up only as an idea, I'm using 2.10 and even when 2.5 is released, it's unlikely I make a quest that can naturally accept such a feature.

Edited by CastChaos, 11 December 2007 - 05:23 PM.


#4 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 12 December 2007 - 01:19 AM

Oh, right.

#5 CastChaos

CastChaos

    Deified

  • Members

Posted 12 December 2007 - 09:52 AM

I looked into it. Took a while for setting up correctly. (It was almost a year since I used a script last time...)

So, now the script does that if the player dies, then after a continue, Link's HP automatically decreases with high speed. However, after a retry, everything becomes normal.

Yes, I think this is the script that does something like I wanted. Except that now the player always has only one life and there's no chance to increase it. Oh, and if the player saves, then no chance for him/her to continue the game.

So, currently this script forces the player for a no-death run.

Since you said "I write the script for you" I guess this isn't the finished script, you just tested the variables.

#6 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 12 December 2007 - 03:45 PM

Aha! well good show then.

OK, for the "No saving" part, I can check to see whether the player has saved and if so, warp him to a screen, play a message, "PLEASE HOLD RESET WHILE YOU TURN POWER OFF", then kill him or something...OR, there are 2 new rules with 2.5, no saving, and skip continue screen. Those would work great.

Now the "retry" part: You can't stop the player from hitting retry, but you can disable saving with the above rules.


Also technically you can do this without scripting, but you can't customize it a whole lot, plus, 2.5 has "save screens", so you can allow the player to save wherever you want him to.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users