C coding for a Street Fighter type Game???

Non-platform specific questions.

C coding for a Street Fighter type Game???

Postby TRON1000 » Fri Aug 18, 2006 5:47 am

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)
TRON1000
 
Posts: 20
Joined: Mon Aug 07, 2006 7:25 am
Score: 0 Give a positive score

Postby Zehper48 » Fri Aug 18, 2006 8:32 pm

to give an enemy gravity you must go to draw actor and script editor and type
Code: Select all
yvelocity = yvelocity - .5;
I like score
User avatar
Zehper48
 
Posts: 241
Joined: Sun Jun 11, 2006 1:34 am
Location: Advanced Noob
Score: 4 Give a positive score

Postby Game A Gogo » Fri Aug 18, 2006 10:48 pm

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;
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 TRON1000 » Sat Aug 19, 2006 1:14 pm

Thanks,


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

It would be alot of help
TRON1000
 
Posts: 20
Joined: Mon Aug 07, 2006 7:25 am
Score: 0 Give a positive score

Postby Game A Gogo » Sat Aug 19, 2006 3:11 pm

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;
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