Page 1 of 1

HELP me :Problem with my kung fu actor

PostPosted: Thu Aug 09, 2018 10:09 pm
by Ehman
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

Re: HELP me :Problem with my kung fu actor

PostPosted: Sun Sep 02, 2018 7:29 pm
by Sarmad786
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;

Re: HELP me :Problem with my kung fu actor

PostPosted: Mon Sep 03, 2018 6:26 am
by Ehman
Thanks a lot!
You must have been familiar with C Language as I can see that you are a new member here.

Re: HELP me :Problem with my kung fu actor

PostPosted: Mon Sep 03, 2018 7:36 am
by Sarmad786
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

Re: HELP me :Problem with my kung fu actor

PostPosted: Mon Sep 03, 2018 9:33 am
by Ehman
Pretty Good, Then using GE is quite easy then...

Re: HELP me :Problem with my kung fu actor

PostPosted: Mon Sep 03, 2018 10:30 am
by Sarmad786
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.

Re: HELP me :Problem with my kung fu actor

PostPosted: Fri Sep 07, 2018 10:40 am
by Ehman
I wish you the best!