Some questions

Non-platform specific questions.

Some questions

Postby GE2007 » Wed Sep 26, 2007 9:12 am

HI all i have some questions:

- i have a 4 frame anim in .gif format [when my actor shoot things], i set delay afrer 4th frame at 50ms and between other frames 10ms. When i test it doesn't work, delay between frames is the same :?:

- my actor moving with right and left arrow... i have an anim [ 5 frames] when my actor jumps diagonally [ up + right or left arrow] my question is how can i make my actor jump when i press both arrows once because only jumps when i hold arrows :? Maybe x axis move event affect on jump event [ how can i disable this event when jumping]

Best Regards GE2007

p.e :sorry for my english
GE2007
 
Posts: 1
Joined: Wed Sep 26, 2007 8:37 am
Score: 0 Give a positive score

Re: Some questions

Postby Spidy » Wed Sep 26, 2007 1:22 pm

??????????????????????????????????????????what do u mean :|
Image
VOTE FOR MY SIGNATURE PLEASE.......THANK YOU
User avatar
Spidy
 
Posts: 935
Joined: Tue Aug 14, 2007 1:28 pm
Location: http://www.inatonibai.com
Score: 38 Give a positive score

Re: Some questions

Postby Bee-Ant » Wed Sep 26, 2007 3:15 pm

[quote="GE2007"]HI all i have some questions:...or moving with right and left arrow... i have an anim [ 5 frames] when my actor jumps diagonally [ up + right or left arrow] my question is how can i make my actor jump when i press both arrows once because only jumps when i hold arrows :? Maybe x axis move event affect on jump event [ how can i disable this event when jumping]

Make 2 variables... var1, var2 (on script editor>variable>add)
on KeyDown event of Left arrow, put this code :
Code: Select all
var1=1;
if(var1==1 && var2==1)
{
    yvelocity=yvelocity-10;
}

on KeyDown event of Right arrow, put this code :
Code: Select all
var2=1;
if(var1==1 && var2==1)
{
    yvelocity=yvelocity-10;
}


On KeyUp event of Left Arrow put this code :
Code: Select all
var1=0;

On KeyUp event of Right Arrow put this code :
Code: Select all
var2=0;


I hope it will help you...(sorry if this is not what are you wanted, I cant understand your English well)
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Some questions

Postby Spidy » Wed Sep 26, 2007 3:48 pm

yeh bee-ant is great he will help ya
Image
VOTE FOR MY SIGNATURE PLEASE.......THANK YOU
User avatar
Spidy
 
Posts: 935
Joined: Tue Aug 14, 2007 1:28 pm
Location: http://www.inatonibai.com
Score: 38 Give a positive score

Re: Some questions

Postby makslane » Wed Sep 26, 2007 4:00 pm

GE2007 wrote:i have a 4 frame anim in .gif format [when my actor shoot things], i set delay afrer 4th frame at 50ms and between other frames 10ms. When i test it doesn't work, delay between frames is the same :?:


All frames are played at the fps defined when you add the animation.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Some questions

Postby Bee-Ant » Thu Sep 27, 2007 12:29 pm

Spidy wrote:yeh bee-ant is great he will help ya

:wink: you'll be great too...just need more time... :D

Oops, I know you mean on second question...maybe like this:
"If I press RightArrow the effect is move right, but if I press RightArrow+UpArrow the effect is Jump to right(diagonally). If I press LeftArrow the effect is move left, but if I press LeftArrow+UpArrow the effect is Jump to left(diagonally), with removing the move effect"..isn't it???

OK...
First, make some variables (the name is up to you) :
1. canjump (integer, actor variable))
2. moveright (integer, actor variable)
3. moveleft (integer, actor variable)

On Collision of top side of Platform(ground), put this code :
Code: Select all
canjump=1;


On CollisionFinish of Platform, put this code :
Code: Select all
canjump=0;


On Keydown of LeftArrow, put this code :
Code: Select all
if(canjump==1)
{
    x=x-3;
    ChangeAnimation("EventActor", "WalkLeft", FORWARD);
}
moveleft=1;


On Keydown of RightArrow, put this code :
Code: Select all
if(canjump==1)
{
    x=x+3;
    ChangeAnimation("EventActor", "WalkRight", FORWARD);
}
moveright=1;


On Keydown of UpArrow, put this code :
Code: Select all
if(moveleft==1)
{
    if(canjump==1)
    {
        yvelocity=yvelocity-10;
        xvelocity=xvelocity-5;
        ChangeAnimation("EventActor", "JumpLeft", FORWARD);
        canjump=0;
    }
}
if(moveright==1)
{
    if(canjump==1)
    {
        yvelocity=yvelocity-10;
        xvelocity=xvelocity+5;
        ChangeAnimation("EventActor", "JumpRight", FORWARD);
        canjump=0;
    }
}


On KeyUp of LeftArrow
Code: Select all
moveleft=0;


On KeyUp of RightArrow
Code: Select all
moveright=0;


Ummm...I hope will help... :D
Thanks,
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron