Page 1 of 1

Tutorial: Flying Kick

PostPosted: Mon Sep 20, 2010 4:31 am
by Wertyboy
Huh....................... This a Turoial making Flying Kick
(Newbies need read the end of topic)

1.Make Player Actor (Newbies)
2.Add some sprite and code for player (More Detail click Help => Demo Making Of => Flatformer Game(In GE)) (Newbies)
3.Use this code (Newbies and another need help)
Player -> Key Down (Your attack key) -> Script Editor
Code: Select all
if(canjump==0)
{
    ChangeAnimation("Event Actor", "(Your Kick Sprite)", FORWARD);
    yvelocity=+20;
    xvelocity=+12;
}


4.Please use all of that code first before add flying kick code (Newbies)
First, Player => Key Down (Jump key) => Script Editor
Click Variables -> Add Variables -> name "canjump"
Use this code
Code: Select all
if(canjump==1)
{
    yvelocity=-12;
    canjump=0;
    ChangeAnimation("Event Actor", "JumpSprite", FORWARD);}

Then Collision - Top side of Tiles - Script Editor
Code: Select all
canjump==1;

More Detail view Tutorial: Making Jump, Double Jump, More Jump

Re: Tutorial: Flying Kick

PostPosted: Mon Sep 20, 2010 6:31 am
by lcl
Pretty good tutorial, you're learning fast, Werty. :wink: :D

Re: Tutorial: Flying Kick

PostPosted: Mon Sep 20, 2010 3:13 pm
by savvy
hmm, ok, this is what i would do...
Code: Select all
if(canjump==1)
{
attacking=1;       //important, this restricts the animations and attacking etc
yvelocity=-20;     //yours is flying to the floor, mine flys up
if(opponent.x<x){xvelocity=-20;ChangeAnimation("Event Actor", "JkickR", FORWARD);}
if(opponent.x>x){xvelocity=20;ChangeAnimation("Event Actor", "JkickL", FORWARD);}
//these ifs determine which side the enemy is on.

then on collision with the floor attacking=0; and canjump=1; (also change animation back to idle)

ok?