Page 1 of 1

speed

PostPosted: Wed Jan 04, 2012 7:43 pm
by raminkhan
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.

Re: speed

PostPosted: Thu Jan 05, 2012 5:52 am
by skydereign
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;
}

Re: speed

PostPosted: Thu Jan 05, 2012 7:41 am
by master0500
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

Re: speed

PostPosted: Thu Jan 05, 2012 7:45 am
by skydereign
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.

Re: speed

PostPosted: Thu Jan 05, 2012 8:11 am
by master0500
i thought there was no multi-touch in the current version