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.
[Request] Help with attacks and movement
Author |
Message |
kpoc
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 Backvia FoxyTunes---------------- Now playing: Hideki Naganuma - Back 2 Backvia FoxyTunes
_________________
Last edited by kpoc on Sat Aug 23, 2008 10:30 am, edited 5 times in total.
|
Sat Aug 23, 2008 9:45 am |
|
|
johnnyg5646
Joined: Mon Aug 11, 2008 6:56 am Posts: 469 Location: not so superhappy fun fun land....
|
r u using gamemaker?
_________________
|
Sat Aug 23, 2008 9:52 am |
|
|
kpoc
Joined: Tue Aug 12, 2008 1:53 pm Posts: 4
Gender: Anime Girl
|
_________________
|
Sat Aug 23, 2008 9:55 am |
|
|
johnnyg5646
Joined: Mon Aug 11, 2008 6:56 am Posts: 469 Location: not so superhappy fun fun land....
|
_________________
|
Sat Aug 23, 2008 11:15 am |
|
|
Olimar Dude
Joined: Tue Aug 12, 2008 3:04 pm Posts: 94 Location: Planet Hocotate with my Wife and Kids.
|
is adobe flash and gamemaker free?
_________________
|
Fri Oct 10, 2008 9:03 pm |
|
|
johnnyg5646
Joined: Mon Aug 11, 2008 6:56 am Posts: 469 Location: not so superhappy fun fun land....
|
gamemaker's free, but flash is 800$
_________________
|
Sat Oct 11, 2008 11:11 am |
|
|
jgillotti1352
Joined: Tue Aug 12, 2008 2:07 pm Posts: 39
|
|
Sun Oct 12, 2008 8:59 pm |
|
|
johnnyg5646
Joined: Mon Aug 11, 2008 6:56 am Posts: 469 Location: not so superhappy fun fun land....
|
srry, here: hope this helps.
_________________
|
Sun Oct 12, 2008 9:03 pm |
|
|
jgillotti1352
Joined: Tue Aug 12, 2008 2:07 pm Posts: 39
|
srry, here: | | | | 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; } } | | | | |
|
Tue Oct 14, 2008 8:21 am |
|
|
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
|
|