The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:44 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 9 posts ] 
[Request] Help with attacks and movement 
Author Message
User avatar

Joined: Tue Aug 12, 2008 1:53 pm
Posts: 4
Gender: Anime Girl
me and my friend are planning on making a flash game but we ran into a problem when the character jumps then land he is still in the jumping pose when he`s on the ground and when he runs even though he stopped he stays in the running pose and when you attack if you let go of the attack button some time he keeps doing the attack if any one can help us it would
be great
http://kpoc1693.deviantart.com/art/soni ... a-95769393 play game here
controls for game are
h and k to move
space to jump
j and z to attack (must be pressed at same time)
if you can`t get pass character select just right click and hit foward same for other screens you can`t get by

----------------
Now playing: Hideki Naganuma - Back 2 Back
via FoxyTunes

----------------
Now playing: Hideki Naganuma - Back 2 Back
via FoxyTunes

_________________
Image


Last edited by kpoc on Sat Aug 23, 2008 10:30 am, edited 5 times in total.



Sat Aug 23, 2008 9:45 am
User avatar

Joined: Mon Aug 11, 2008 6:56 am
Posts: 469
Location: not so superhappy fun fun land....
r u using gamemaker?

_________________
Image

ashante08 wrote:
We argue, we try to understand each of our problems, we argue some more, rinse and repeat


Sat Aug 23, 2008 9:52 am
User avatar

Joined: Tue Aug 12, 2008 1:53 pm
Posts: 4
Gender: Anime Girl
no adobe flash

----------------
Now playing: Crush 40 - His World [Crush 40 Version]
via FoxyTunes

_________________
Image


Sat Aug 23, 2008 9:55 am
User avatar

Joined: Mon Aug 11, 2008 6:56 am
Posts: 469
Location: not so superhappy fun fun land....
http://johnjensen.deviantart.com/art/HOW-TO-MAKE-A-PLATFORMER-Pt-1-42322593
if this dosn't help, PM me.

_________________
Image

ashante08 wrote:
We argue, we try to understand each of our problems, we argue some more, rinse and repeat


Sat Aug 23, 2008 11:15 am
User avatar

Joined: Tue Aug 12, 2008 3:04 pm
Posts: 94
Location: Planet Hocotate with my Wife and Kids.
is adobe flash and gamemaker free?

_________________
Image


Fri Oct 10, 2008 9:03 pm
User avatar

Joined: Mon Aug 11, 2008 6:56 am
Posts: 469
Location: not so superhappy fun fun land....
Olimar Dude wrote:
is adobe flash and gamemaker free?

gamemaker's free, but flash is 800$

_________________
Image

ashante08 wrote:
We argue, we try to understand each of our problems, we argue some more, rinse and repeat


Sat Oct 11, 2008 11:11 am
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39

it doesn't help us

_________________
get free wii points here!


Sun Oct 12, 2008 8:59 pm
User avatar

Joined: Mon Aug 11, 2008 6:56 am
Posts: 469
Location: not so superhappy fun fun land....
jgillotti1352 wrote:

it doesn't help us

srry,
here:
Code:
// put this in the code for the char
if (this.hitTest(_root.ground))
_root.char.gotoAndPlay(whateverframeyouhaveforhimstanding);
}

hope this helps.

_________________
Image

ashante08 wrote:
We argue, we try to understand each of our problems, we argue some more, rinse and repeat


Sun Oct 12, 2008 9:03 pm
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39
johnnyg5646 wrote:
jgillotti1352 wrote:

it doesn't help us

srry,
here:
Code:
// put this in the code for the char
can you tell me what is wrong with this code
if (this.hitTest(_root.ground))
_root.char.gotoAndPlay(whateverframeyouhaveforhimstanding);
}
Code:
onClipEvent (load) {
var grav:Number = 0;
var run:Number = 20;
var wlk:Number = 2.5;
var speed:Number = run;
var jumpHeight:Number = 30;
var dbl:Number = 28;
var tri:Number = 25;
var djump:Boolean = false;
var tjump:Boolean = false;
var slow:Number = 2;
var slowspd:Number = speed/2;
var setspeed:Number = speed;
var scale:Number = _xscale;
var ex:Number = 5;
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
grav+=3;
_y += grav;
if (Key.isDown(65)) {
setspeed = wlk;
} else {
setspeed = run;
}
while (_root.ground.hitTest(_x, _y, true)) {
djump = false;
tjump = false;
_y--;
grav = 0;
}
if (_root.water.hitTest(_x, _y, true)) {
grav *= slow*1.25;
speed = slowspd;
} else {
speed = setspeed;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
_xscale = scale;
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop("run");
} else {
if (djump == false) {
this.gotoAndStop("jump");
} else if (tjump == false) {
this.gotoAndStop("jump");
} else {
this.gotoAndStop("jump");
}
}
} else if (Key.isDown(Key.LEFT)) {
_x -= speed;
_xscale = -scale;
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop("run");
} else {
if (djump == false) {
this.gotoAndStop("jump");
} else if (tjump == false) {
this.gotoAndStop("jump");
} else {
this.gotoAndStop("jump");
}
}
} else {
if (_root.ground.hitTest(_x, _y+3, true) && !Key.isDown(Key.DOWN) && !Key.isDown(90)) {
this.gotoAndStop("idle");
}
}
if (Key.isDown(68) && !Key.isDown(Key.SPACE) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT) && !Key.isDown(83) && _root.ground.hitTest(_x, _y+0, true)) {
this.gotoAndStop(8);
}
if (Key.isDown(83) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.SPACE) && !Key.isDown(68) && _root.ground.hitTest(_x, _y+0, true) && _currentframe != 6) {
this.gotoAndStop(7);
} else if (Key.isDown(90) && grav>1) {
this.gotoAndStop("idle");
}
if (!Key.isDown(Key.DOWN) && !Key.isDown(90)) {
this.gotoAndStop("attack1");
}
if (Key.isDown(Key.SPACE) && _root.ground.hitTest(_x, _y+3, true)) {
grav = -jumpHeight;
_y -= 4;
this.gotoAndStop(2);
} else if (Key.isDown(Key.SPACE) && djump == false && grav>0 && tjump == false) {
grav = -dbl;
djump = true;
this.gotoAndStop("jump");
} else if (Key.isDown(68) && tjump == false && grav>1) {
grav = -tri;
tjump = true;
this.gotoAndStop("jump");
}
if (_root.ground.hitTest(_x+(_width/2)+ex, _y-(_height/2), true) || _root.ground.hitTest(_x+(_width/2)+ex, _y-(_height/6), true) || _root.ground.hitTest(_x+(_width/2)+ex, _y-_height, true)) {
_x -= speed;
}
if (_root.ground.hitTest(_x-(_width/2)-ex, _y-(_height/2), true) || _root.ground.hitTest(_x-(_width/2)-ex, _y-(_height/6), true) || _root.ground.hitTest(_x-(_width/2)-ex, _y-_height, true)) {
_x += speed;
}
if (_root.ground.hitTest(_x, _y-_height-15, true)) {
grav = 1;
}
}

_________________
get free wii points here!


Tue Oct 14, 2008 8:21 am
Display posts from previous:  Sort by  
 [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.