Preventing the game for granting additional credits

mersox

Active member
There's this situation with the Power Rangers game that I don't know where the hell it comes from, and I would like to fix.

The game doesn't have continues (theres only one credit, the minimum to start the game). However I'm getting reports that you get one continue/additional credit if you load a previously saved game. How can I tell the engine to not give a credit on a loaded game?
 
I thought of setting up script so that each time a character dies (or falls, actually), the system checks which player is using that character, and sets that player's credits to zero.

I did that and the game runs fine but it's ignoring the script and allowing the player to "press start" and respawn after all lives are used (basically granting a continue). Not sure if the engine will grant that continue no matter what I do, or if the script itself is wrong. Here it is:

anim fall
@script
    void self = getlocalvar("self");

void p1 = getplayerproperty(0,"ent");
void p2 = getplayerproperty(1,"ent");

void p1model = getentityproperty(p1,"model");
void p2model = getentityproperty(p2,"model");



if (frame == 1 && (p1model == "zack")){


changeplayerproperty(0, "credits", 0);

}
else if (frame == 1 && (p2model == "zack")){


changeplayerproperty(1, "credits", 0);

}
@end_script
@cmd randSound "zackhit.wav" "zackhit.wav" "zackhit.wav"
sound data/sounds/beat1old.wav
loop 0
offset 57 98
delay 30

frame data/chars/zack/fall00.gif
frame data/chars/zack/fall01.gif
frame data/chars/zack/fall02.gif
 
No, I'll look into it. Thanks!

------
EDIT:

I created an ondeathscript.c that looks like this:

void main()
{
    void self = getlocalvar("self");

void p1 = getplayerproperty(0,"ent");
void p2 = getplayerproperty(1,"ent");

  if (self == p1){


changeplayerproperty(0, "credits", 0);

  }
  else if (self == p2){


changeplayerproperty(1, "credits", 0);

  }

  }

I assigned it to one of the characters, tried it... and nothing happens. Still gets a continue. At least the game doesn't crash :S
 
Back
Top Bottom