Tutorial: Flying Kick

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

Tutorial: Flying Kick

Postby Wertyboy » Mon Sep 20, 2010 4:31 am

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
Last edited by Wertyboy on Mon Sep 20, 2010 3:06 pm, edited 1 time in total.
User avatar
Wertyboy
 
Posts: 543
Joined: Tue Jun 15, 2010 12:38 pm
Location: HCM City, Vietnam
Score: 44 Give a positive score

Re: Tutorial: Flying Kick

Postby lcl » Mon Sep 20, 2010 6:31 am

Pretty good tutorial, you're learning fast, Werty. :wink: :D
Last edited by lcl on Mon Sep 20, 2010 6:50 pm, edited 1 time in total.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Tutorial: Flying Kick

Postby savvy » Mon Sep 20, 2010 3:13 pm

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?
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest