speed

Non-platform specific questions.

speed

Postby raminkhan » Wed Jan 04, 2012 7:43 pm

hi if you take a look at this toturial done by LCL he made this buttons onscreen. Okay kind of edit this file and made a hit button for it but here's my questions which I can't figure out.

1.) How to make the buttons left and right to pick up speed if you keep pressing on them.
2.) My game requires you to jump your character from platform to platform so I need not just a jump button but I want to be able to use left and right movements while I am jump. so In other words not just vertical jump but projectile jumps.

so here is the link by lcl: viewtopic.php?f=4&t=9246&p=64348&hilit=onscreen#p64268

THANKS A LOT.
raminkhan
 
Posts: 63
Joined: Mon Sep 12, 2011 3:35 pm
Score: 0 Give a positive score

Re: speed

Postby skydereign » Thu Jan 05, 2012 5:52 am

Projectile arcing motion is just normal xvelocity with gravity. So, by the way you typed that, it sounds like the button presses will only increase/decrease speed, instead of being constant motion if the buttons are pressed. Because of that, I'm going to assume you are using xvelocity instead of x+=. In that case, you can just do this on the mouse button down events. One thing is that I suggest using clones for your left and right button (so make them one actor). The clone.0 should be the left button, and the clone.1 should be the right button.
button -> Mouse Button Down (Left) -> Script Editor
Code: Select all
switch(cloneindex)
{
    case 0: // left button
    player.xvelocity--;
    break;

    case 1: // right button
    player.xvelocity++;
    break;
}
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: speed

Postby master0500 » Thu Jan 05, 2012 7:41 am

raminkhan wrote:2.) My game requires you to jump your character from platform to platform so I need not just a jump button but I want to be able to use left and right movements while I am jump. so In other words not just vertical jump but projectile jumps.

you will probably have to wait until 1.5 when multi-touch support is available
master0500
 
Posts: 409
Joined: Sun Jun 26, 2011 9:42 pm
Score: 27 Give a positive score

Re: speed

Postby skydereign » Thu Jan 05, 2012 7:45 am

Multitouch is already supported. The problem with multitouch was how it was interpreted by the geplayer, so currently you can use any version of gE to do multitouch.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: speed

Postby master0500 » Thu Jan 05, 2012 8:11 am

i thought there was no multi-touch in the current version
master0500
 
Posts: 409
Joined: Sun Jun 26, 2011 9:42 pm
Score: 27 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest