Page 1 of 1

health bar

PostPosted: Sun Jul 30, 2006 12:24 am
by LUFFY
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. :!:

PostPosted: Sun Jul 30, 2006 12:43 am
by Game A Gogo
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

PostPosted: Sun Jul 30, 2006 12:46 am
by Game A Gogo
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.

PostPosted: Mon Jul 31, 2006 1:04 am
by Mrquarter
wow thats complicated

PostPosted: Mon Jul 31, 2006 1:54 am
by Game A Gogo
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!

PostPosted: Mon Jul 31, 2006 2:20 am
by makslane