HELP me :Problem with my kung fu actor

Learn how to make certain types of games and use gameEditor.

HELP me :Problem with my kung fu actor

Postby Ehman » Thu Aug 09, 2018 10:09 pm

How can I make my actor (probably a kung fu fighter) deduct its opponent's life not until when the kick/punch button is pressed.
I know on collision event can't work here Please Help me
User avatar
Ehman
 
Posts: 186
Joined: Wed Apr 18, 2018 7:56 pm
Location: MonsteRealm
Score: 1 Give a positive score

Re: HELP me :Problem with my kung fu actor

Postby Sarmad786 » Sun Sep 02, 2018 7:29 pm

You can do like :
GlobalCode
Code: Select all
int punching;
int kicking;
int OpponentHealth;


KungFuActor>CreateActor
Code: Select all
punching = 0;
kicking = 0;


KungFuActor>KeyDown(A) //repeat should be disabled
Code: Select all
punching = 1;


KungFuActor>KeyDown(D) //repeat should be disables
Code: Select all
kicking = 1;


KungFuActor>Collision)(Opponent)
Code: Select all
if(punching == 1)
OpponentHealth -= 5;
if(kicking == 1)
OpponentHealth -= 10;
Working on SpaceShooter :D
User avatar
Sarmad786
 
Posts: 12
Joined: Sat Sep 01, 2018 8:19 am
Score: 0 Give a positive score

Re: HELP me :Problem with my kung fu actor

Postby Ehman » Mon Sep 03, 2018 6:26 am

Thanks a lot!
You must have been familiar with C Language as I can see that you are a new member here.
User avatar
Ehman
 
Posts: 186
Joined: Wed Apr 18, 2018 7:56 pm
Location: MonsteRealm
Score: 1 Give a positive score

Re: HELP me :Problem with my kung fu actor

Postby Sarmad786 » Mon Sep 03, 2018 7:36 am

Ehman wrote:Thanks a lot!
You must have been familiar with C Language as I can see that you are a new member here.


Yes we were taught C language in our College.
Glad to help you !! :D
Working on SpaceShooter :D
User avatar
Sarmad786
 
Posts: 12
Joined: Sat Sep 01, 2018 8:19 am
Score: 0 Give a positive score

Re: HELP me :Problem with my kung fu actor

Postby Ehman » Mon Sep 03, 2018 9:33 am

Pretty Good, Then using GE is quite easy then...
User avatar
Ehman
 
Posts: 186
Joined: Wed Apr 18, 2018 7:56 pm
Location: MonsteRealm
Score: 1 Give a positive score

Re: HELP me :Problem with my kung fu actor

Postby Sarmad786 » Mon Sep 03, 2018 10:30 am

Ehman wrote:Pretty Good, Then using GE is quite easy then...


Yes, it is. But still i'm learning many new tecqs through this forum. I am currently developing a game- it's my first game.
Working on SpaceShooter :D
User avatar
Sarmad786
 
Posts: 12
Joined: Sat Sep 01, 2018 8:19 am
Score: 0 Give a positive score

Re: HELP me :Problem with my kung fu actor

Postby Ehman » Fri Sep 07, 2018 10:40 am

I wish you the best!
User avatar
Ehman
 
Posts: 186
Joined: Wed Apr 18, 2018 7:56 pm
Location: MonsteRealm
Score: 1 Give a positive score


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest