Canceled Final Fight SNES (Demo Released!!!)

Project is halted prior to completion and will not receive further updates.
Nice soundtrack it does have that old school vibe very nice ! I remember someone posting about a issue showing the X over enemy icon when HP reaches zero you seem to have it working fine did you have to use scripts for that ?

I am also born in 1981 but I am guessing anyone who played streets of rage 1 on the megadrive / genesis  was born in the 80s
 
Thanks Malik :)

Yeah I did finally lol. I used spawn06 in script.c to spawn it in a specific location. Then I just set the type as a ''panel'' that scrolls with the screen and set the speed to 10 same as bg. So I did use script yes =]

Code:
name	dugx
type	panel
shadow	0
noquake 1 1
setlayer 200
speed 10

I set the layer to 200 so if you grab another enemy the HUD will still overlay with the enemy icon. Also made box portraits to give the arcade style feel, and also so the x flashing isn't visible behind using the SNES transparent background icons =D

I actually did play SOR first. On the Sega CD actually, the Sega classics disc with Golden Axe, Columns, and Revenge of Shinobi lol. Then my friend introduced me to FF on the SNES. I didn't know the 89' arcade existed until years later O.O haha.



 
@msmalik681 - I think you can do something like this to check which player's exist first and run the script accordingly.  So it's setup for player 1 and 2 at once.

rough example
Code:
void p1 = getplayerproperty(0, "entity");
void p2 = getplayerproperty(1, "entity");

if(getentityproperty(p1, "exists")) {

'RUN THIS CODE'
}

if(getentityproperty(p2, "exists")) {

RUN THIS CODE
}
 
I have optimized the code a bit and now this should work for both player 1 & 2 I have uploaded another example demo and added as much notes to the code as I could to make it easy to follow !

Example Demo: http://www.mediafire.com/?e4n7hrv8ylc54jc

to get this to work copy the X folder in scripts to your scripts folder.  You must add this line to all your level headers "updatescript data/scripts/X/deathx.c" if your already using update scripts then use the #include option.  you should use your own custom X.png image to suite your mod and set the X and Y on the drawsprite part of the code to overlap the enemy icon. hope this helped don't hesitate to ask any questions !

the code:
void main()
{
int P1 = getentityproperty(getplayerproperty(0, "entity"), "opponent"); //check if player 1 is interacting with someone/something
int timer1; //just timer

int P2 = getentityproperty(getplayerproperty(1, "entity"), "opponent"); //check if Player 2 interacting with someone/something
int timer2; //just timer

if(timer1==NULL()){ //find out if timer has no value
timer1 = 0;} // set value to zero

if(P1 != NULL() && getentityproperty(P1, "health") < 1) //if player is interacting with someone and their health is zero
  {
  timer1 = timer1+1; // starting ticking the timer update scripts run on every tick so this will clock up fast
    if(timer1>10) // if timer reaches ten then run below code
    {
    setglobalvar("X1",loadsprite("data/scripts/X/x.png")); // load X image to handel to be used
    drawsprite(getglobalvar("X1"),2,19,9999999); // get image to draw (have to use handel) at X,Y and Layer
          if(timer1>15) //if timer reaches 15 run below code
      {
          timer1=NULL(); // remove value from timer to start a loop !
      }
      }
  }

if(timer2==NULL()){ //find out if timer has no value
timer2 = 0;} // set value to zero

if(P2 != NULL() && getentityproperty(P2, "health") < 1) //if player is interacting with someone and their health is zero
  {
  timer2 = timer2+1; // starting ticking the timer update scripts run on every tick so this will clock up fast
    if(timer2>10) // if timer reaches ten then run below code
    {
    setglobalvar("X2",loadsprite("data/scripts/X/x.png")); // load X image to handel to be used
    drawsprite(getglobalvar("X2"),182,19,9999999); // get image to draw (have to use handel) at X,Y and Layer
          if(timer2>15) //if timer reaches 15 run below code
      {
          timer2=NULL(); // remove value from timer to start a loop !
      }
      }
  }
}
 
Awesome Malik! The only downside of ''opponent'' is the fact that it includes items also, so the X flashes over the food and point icons.

Can you set the script to only do ''TYPE_ENEMY'' so it doesn't flash the X over items?

Something like...  getentityproperty(type, ''enemy'') using openborconstant?
 
all done here is a updated demo: http://www.mediafire.com/?xc70as5wx3tf73r

if you just want the code:

void main()
{
int P1 = getentityproperty(getplayerproperty(0, "entity"), "opponent"); //check if player 1 is interacting with someone
int timer1; //just timer

int P2 = getentityproperty(getplayerproperty(1, "entity"), "opponent"); //check if Player 2 interacting with someone
int timer2; //just timer

if(timer1==NULL()){ //find out if timer has no value
timer1 = 0;} // set value to zero

if(P1 != NULL() && getentityproperty(P1, "health") < 1 && getentityproperty(P1, "TYPE") == openborconstant("TYPE_ENEMY")) //if player is interacting, their hp is zero and they are a enemy
  {
  timer1 = timer1+1; // starting ticking the timer update scripts run on every tick so this will clock up fast
    if(timer1>10) // if timer reaches ten then run below code
    {
    setglobalvar("X1",loadsprite("data/scripts/X/x.png")); // load X image to handel to be used
    drawsprite(getglobalvar("X1"),2,19,9999999); // get image to draw (have to use handel) at X,Y and Layer
          if(timer1>15) //if timer reaches 15 run below code
      {
          timer1=NULL(); // remove value from timer to start a loop !
      }
      }
  }

if(timer2==NULL()){ //find out if timer has no value
timer2 = 0;} // set value to zero

if(P2 != NULL() && getentityproperty(P2, "health") < 1 && getentityproperty(P2, "TYPE") == openborconstant("TYPE_ENEMY")) //if player is interacting with someone and their health is zero
  {
  timer2 = timer2+1; // starting ticking the timer update scripts run on every tick so this will clock up fast
    if(timer2>10) // if timer reaches ten then run below code
    {
    setglobalvar("X2",loadsprite("data/scripts/X/x.png")); // load X image to handel to be used
    drawsprite(getglobalvar("X2"),182,19,9999999); // get image to draw (have to use handel) at X,Y and Layer
          if(timer2>15) //if timer reaches 15 run below code
      {
          timer2=NULL(); // remove value from timer to start a loop !
      }
    }
  }
}


I also added a script in the demo if you want to check the value of any variable and display it on screen I found it very useful !
 
Thanks Malik!!! You rock! =D

Is there any way to set the delay on the flash lower to make it flash a pinch faster? And could you set it for enemies, and obstacles? =D
That's it!!!! Then using yours hands down  ;D
 
so here I have made it so as long as the interaction is with a entity with 0 hp and its not a item and I have increased the speed of the X flash.  I think you should play with the speed settings until you have the flash looking just the way you want it I have highlighted in red what values you have to edit from the "deathX.c" just open in notepad and make sure the 1st figure is lower then the second for each player.  The second figure does not have to be double the 1st one I just wanted a even on off flash !

void main()
{
int P1 = getentityproperty(getplayerproperty(0, "entity"), "opponent"); //check if player 1 is interacting with someone
int timer1; //just timer

int P2 = getentityproperty(getplayerproperty(1, "entity"), "opponent"); //check if Player 2 interacting with someone
int timer2; //just timer

if(timer1==NULL()){ //find out if timer has no value
timer1 = 0;} // set value to zero

if(P1 != NULL() && getentityproperty(P1, "health") < 1 && getentityproperty(P1, "TYPE") != openborconstant("TYPE_ITEM")) //if player is interacting, hp is zero and they are not a item
  {
  timer1 = timer1+1; // starting ticking the timer update scripts run on every tick so this will clock up fast
    if(timer1>8) // if timer reaches ten then run below code
    {
    setglobalvar("X1",loadsprite("data/scripts/X/x.png")); // load X image to handel to be used
    drawsprite(getglobalvar("X1"),2,19,9999999); // get image to draw (have to use handel) at X,Y and Layer
          if(timer1>13) //if timer reaches 15 run below code
      {
          timer1=NULL(); // remove value from timer to start a loop !
      }
      }
  }

if(timer2==NULL()){ //find out if timer has no value
timer2 = 0;} // set value to zero

if(P2 != NULL() && getentityproperty(P2, "health") < 1 && getentityproperty(P2, "TYPE") != openborconstant("TYPE_ITEM")) //if player is interacting, hp is zero and they are not a item
  {
  timer2 = timer2+1; // starting ticking the timer update scripts run on every tick so this will clock up fast
    if(timer2>8) // if timer reaches ten then run below code
    {
    setglobalvar("X2",loadsprite("data/scripts/X/x.png")); // load X image to handel to be used
    drawsprite(getglobalvar("X2"),182,19,9999999); // get image to draw (have to use handel) at X,Y and Layer
          if(timer2>13) //if timer reaches 15 run below code
      {
          timer2=NULL(); // remove value from timer to start a loop !
      }
    }
  }
}


demo: http://www.mediafire.com/?26bbx0pb5cd5xmw
 
Perfect man! Thank you so much!

I know you've played Final Fight before. Do you know how the lifebar colors are solid and don't drain until they get down to yellow? They just cycle though the colors as they lose health. Can you script that? I'm sure you know what I'm talking about  :D

And is there a way you can script the lifebar drain on yellow to be instant rather than being visible just like Final Fight?! =D

And is there any way for the obstacle lifebar to stay on the screen a little longer, and not have a lifebar, but still an icon? Sorry to bother you with all of it, but you are a genius haha ^___^

 
apescott said:
Perfect man! Thank you so much!

I know you've played Final Fight before. Do you know how the lifebar colors are solid and don't drain until they get down to yellow? They just cycle though the colors as they lose health. Can you script that? I'm sure you know what I'm talking about  :D

And is there a way you can script the lifebar drain on yellow to be instant rather than being visible just like Final Fight?! =D

And is there any way for the obstacle lifebar to stay on the screen a little longer, and not have a lifebar, but still an icon? Sorry to bother you with all of it, but you are a genius haha ^___^

You need to read up on the manual about "lbarsize" the "type" option will fix your colour cycle problem and you might want to set "olbarsize" so its just for enemies not players !

I don't think you can get that instant drain on the life like FF .  Don't think you can remove the life bar for obstacles sorry !
 
You can use this to hide lifebars
Code:
nolife {bi}

~Determines whether or not the player can see the entity's life when they make contact.
0 = they CAN see it. Defaults to 0.
1 = they CANNOT see it.
 
I spotted one bug: when Haggar slammed J just before he cleared storeroom, J is moved to Haggar's front instead of dropped behind him.

I also noticed that Damnd is way easier than original.

However, overall, you've done great work replicating arcade version of Final Fight.

New moves and motolov weapon are nice touches.

I think you only need to fix enemy and bosses' AI + add script to give score if foods are taken in full HP
 
Bloodbane said:
I spotted one bug: when Haggar slammed J just before he cleared storeroom, J is moved to Haggar's front instead of dropped behind him.

I also noticed that Damnd is way easier than original.

However, overall, you've done great work replicating arcade version of Final Fight.

New moves and motolov weapon are nice touches.

I think you only need to fix enemy and bosses' AI + add script to give score if foods are taken in full HP

Thanks Blood. When the J was slammed I had a wall there so that's why that happened. I've raised Damnd's aggression so he is tougher. I did add the give score scripts for the food already :)
 
Back
Top Bottom