Basics... Moving/Jumping/shooting
Posted: Fri Aug 03, 2007 4:53 am
here are the basics for big beginners...
Walking Right...
Add Event/key down/press key for moving right/script editor/x=x+5;/x+=5;
Walking Left...
Add Event/key down/press key for moving left/script editor/x=x-5;/x-=5;
Jumping...
open script editor/add a variable called canJump/ collision with ground type in Script Editor:
canJump = 1;
on the key down for our jump/ script editor/type:
if (canJump == 1)
{
yvelocity=-17;
canJump = 0;
}
for gravity type in /add event/draw actor/script editor of player:
yvelocity=yvelocity+1;
And to shoot:
Add event/key down for your shoot key/create actor/ your actor to be shot.
Then on the actor that is shot, (bullet), add event/create actor/for down/yvelocity=yvelocity+17; /for up/yvelocity=yvelocity-17; /for left xvelocity=xvelocity-17;/for right/xvelocity=xvelocity+17;
and that pretty much sums it up for moving/shooting/and jumping!
PS: i think i might have mixed up the shoot up and shoot down
Walking Right...
Add Event/key down/press key for moving right/script editor/x=x+5;/x+=5;
Walking Left...
Add Event/key down/press key for moving left/script editor/x=x-5;/x-=5;
Jumping...
open script editor/add a variable called canJump/ collision with ground type in Script Editor:
canJump = 1;
on the key down for our jump/ script editor/type:
if (canJump == 1)
{
yvelocity=-17;
canJump = 0;
}
for gravity type in /add event/draw actor/script editor of player:
yvelocity=yvelocity+1;
And to shoot:
Add event/key down for your shoot key/create actor/ your actor to be shot.
Then on the actor that is shot, (bullet), add event/create actor/for down/yvelocity=yvelocity+17; /for up/yvelocity=yvelocity-17; /for left xvelocity=xvelocity-17;/for right/xvelocity=xvelocity+17;
and that pretty much sums it up for moving/shooting/and jumping!
PS: i think i might have mixed up the shoot up and shoot down