4 Direction Attacking System

Game Editor comments and discussion.

Re: 4 Direction Attacking System

Postby skydereign » Sun Oct 07, 2012 7:54 am

DrakeStoel wrote:but it still stays in the stab animation until I let go.

Don't have your keydown event be set to repeat.

You could use the two frame thing, it is a common fix to gE's animation finish event being triggered at the start of the last frame. You could also create a timer when you attack. That way the timer event has the switch statement.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: 4 Direction Attacking System

Postby DrakeStoel » Sun Oct 07, 2012 9:41 am

I'm not sure on when to create the timer, or what it's function should be.

EDIT: No wait. I figured it out! Just put a timer on the view. Thanks for your help guys!
DrakeStoel
 
Posts: 43
Joined: Wed Oct 03, 2012 8:53 am
Score: 2 Give a positive score

Re: 4 Direction Attacking System

Postby Soullem » Sun Oct 07, 2012 3:01 pm

to make him stop moving you can add an if statement with a variable around your movement called CanMove.
Code: Select all
if (CanMove==0)
{
//Movement Code
}


Then on your attack button down set CanMove to 1.
And on Attack button up set it to 0
Current Project:
The Project That needs to be Done -- Pokemon http://game-editor.com/forum/viewtopic.php?f=4&t=12591

Temporarily Abandoned:
Souls of Gustara -- Awesome upgrade blimp game 42%ish
Eggventures of Eggman -- Adventure Game 20%ish
User avatar
Soullem
 
Posts: 105
Joined: Thu Aug 02, 2012 3:12 pm
Score: 5 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest