health bar

Non-platform specific questions.

health bar

Postby LUFFY » Sun Jul 30, 2006 12:24 am

o.k i am tring to make a super smash bros type game. so i need to know how to make a health bar like this 100/100 and when it reaches 0 they dont die they just are more easy to k.o

p.s right you cant make a two player game in game editor cause that is not what im trying to do. :!:
obey the taco man
OBEY HIM!!!!!!!!!!!!!
LUFFY
 
Posts: 10
Joined: Wed Apr 05, 2006 12:04 am
Score: 0 Give a positive score

Postby Game A Gogo » Sun Jul 30, 2006 12:43 am

ill show you how to make him strike and go off screen.

on collision hit your atack
Code: Select all
angle=direction( ennemy player.x, ennemyplayer.y, yourplayer.x, yourplayer.y)+180;\\opposite angle from the striking
directional_velocity=(ennemyhealth/10)+4;\\making him fly depending the percent(this is for the percentage that gos from 0 to 100%, you shouuld do that!)
int striking;
striking=1;
ennemyhealth+=9+rand(6);\\ increasing the damage ratio


in draw actor
Code: Select all
if(striking)
{
directional_velocity*=0.06;
}

on collision whit the ground (note, remove the physical respond if there is currently one)
Code: Select all
if(striking)
{
angle+=180;\\to make a richochet effect
}
else
{
physicalrespond action here*\\the physical respond if only standing, moving...
}


Note:
you must have a variable of the ennemy health

on the damge ratio text in draw actor:
Code: Select all
textNumber=ennemyhealth;\\making the text the same as the  ennemy health


in create actor:
Code: Select all
ennemyhealth=0;\\changing var at start of battle
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Game A Gogo » Sun Jul 30, 2006 12:46 am

and if you want to make the screen shake, create a path(coresponding to the screen shaking) and in collision of the ground
Code: Select all
if(striking)
{
changepath(your path);
}


and on path finish just no path.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Mrquarter » Mon Jul 31, 2006 1:04 am

wow thats complicated
Image

Image
User avatar
Mrquarter
 
Posts: 3
Joined: Mon Jul 31, 2006 12:42 am
Score: 0 Give a positive score

Postby Game A Gogo » Mon Jul 31, 2006 1:54 am

actually, its pretty simple, when your used to it, some i just feel i can tell everyone how to some stuff, but i cant do it to my self, lol!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score



Return to General

Who is online

Users browsing this forum: No registered users and 1 guest