Page 1 of 1

C coding for a Street Fighter type Game???

PostPosted: Fri Aug 18, 2006 5:47 am
by TRON1000
Can anyone tell me any of these things???

-How to make enemies know when to attack and defend

-How to create a health bar that shrinks determined by damage

-How to give enemy gravity(so when they have a path they do not float)

PostPosted: Fri Aug 18, 2006 8:32 pm
by Zehper48
to give an enemy gravity you must go to draw actor and script editor and type
Code: Select all
yvelocity = yvelocity - .5;

PostPosted: Fri Aug 18, 2006 10:48 pm
by Game A Gogo
Zehper48 wrote:to give an enemy gravity you must go to draw actor and script editor and type
Code: Select all
yvelocity = yvelocity - .5;

a more simplefyed code:
Code: Select all
yvelocity-=.5;

PostPosted: Sat Aug 19, 2006 1:14 pm
by TRON1000
Thanks,


Do you know how to do one of the other things maybe???

It would be alot of help

PostPosted: Sat Aug 19, 2006 3:11 pm
by Game A Gogo
for the health bar, use an animation (from full to empty) and then create a health actor that has the health bar animation, in create actor event, just put: animation dirrection:stopped. and then in draw actor, do
Code: Select all
is(animpos>(nframes-1))
{
DestroyActor("player")
}

and on everytime your caracter is hit put:
Code: Select all
health.animpos-=1;