ActionScript 2.0 :: Platformer - Character Clips Landing From Jump

May 25, 2011

I'm trying to make a platformer and I'm having a problem where the character will clip half through the ground upon landing from a jump. Just so you have a clear picture -- right now all that's on the stage is the character (which the code is placed in) and the ground (a completely flat plane called 'ground')

Here's the code:
onClipEvent(load) {
jumpHeight =0;
defaultJumpSpeed = 20;
jumpSpeed = 20;
} onClipEvent(enterFrame) {
[Code] .....

Right now the character's jump constantly decreases to give the effect of gravity. It starts out positive (character moves up), then goes negative (character falls down) The character will only stop falling if they come in contact with the ground (in the form of a hit test). The problem (I think) is that the character can fall at, say, 36 pixels a second or more, so sometimes they'll be half through the ground before the hit test goes off and stops him from falling further. How do I stop it without making the character fall-rate really, really low.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Maximum Jump Height For Platformer?

Jul 6, 2008

I am making my second game, and it's going to be a platformer. Unfortunately, I have no idea how to make the character (named hero) jump only to a certain height, and then fall back down. someone, please post a way to do this!

View 1 Replies

ActionScript 3.0 :: Platformer - Moving Character And Loading Levels

Jan 28, 2012

I am currently working on a platformer using accelerometer to move the character and xml to load levels as so..
[as]
level.x += (e.accelerationX*40);
if (e.accelerationX > 5) {
e.accelerationX = 5;
} if (e.accelerationX * 40 < 3 && e.accelerationX * 40 > -3) {
player.gotoAndStop(1);
[Code] .....
And it is all added into one movieclip called level. My problem is when the character hits under a platform it will go up it which I don't want it too, I don't know how to fix it heres the gravity code.

View 11 Replies

ActionScript 2.0 :: Getting Character To Jump?

Jun 16, 2011

I am having a problem with a jump code. The problem I am having is when space bar isDown the jump code works but when space bar is release my object is left up in the air. How can I get the object to come back down.

ActionScript Code:
var gravity:Number = 10;
var jumpPower:Number = 0;

[code]........

View 4 Replies

ActionScript 2.0 :: Can't Make Character Jump?

Nov 14, 2006

I am creating a game in flash using spirte sheets of megaman and I have a problem setting up script to make him jump. I am able to have megaman run side to side and also shoot but I can not get him to jump. Here is a sample of my code:

var hspeed = 0;
var vspeed = 0;
var i = 0;

[code].....

View 3 Replies

When Hit UP Key To Jump The Character Continues To Move Up As Hold The Key Down

Feb 3, 2010

A) When I hit the UP key to jump the character continues to move up as I hold the key down.

B) When I stop moving forward the frame of the stickman symbol for walking keeps playing and I want it so the frame labeled "idle" will play when I release right or left.

C) Is it possible to have an action for holding 2 keys at once? I want to have it so i can hold SPACE and RIGHT/LEFT to run.

[Code]...

View 2 Replies

ActionScript 3.0 :: Get A Character To Jump Up When Press The Spacebar

Aug 26, 2010

I am trying to get a character to jump up when I press the spacebar and come down by himself but am having a dickens of a time doing so. Here's the code I am using: This is the LevelOne class, there is also a player class:

[Code]....

View 5 Replies

Professional :: Make Character To Jump When Hit The Space Bar?

Aug 10, 2011

how do i make my animation not fall of the stage when i make it move with they arrow keys?also how do i make my character jump when i hit the space bar using actionscript?

View 1 Replies

ActionScript 3.0 :: How To Make Character Jump Onto Platform

Sep 2, 2009

I am trying to make a character jump on to a platform this is my code. The block1, block2 etc are the blocks that I want my character to jump on

PHP Code:
var onBlock:Boolean;
var blockHolder:Array = new ArrayblockHolder.push(block1)
blockHolder.push(block2)
blockHolder.push(block3)
stage.addEventListener(KeyboardEvent.KEY_DOWN, checkBlock)
[Code] ....

The onBlock boolean is used later but my problem is that the code doesn't work.

View 1 Replies

ActionScript 3.0 :: How To Get Character Walk And Jump On Key Press

Feb 4, 2010

I am making a walk and jump game. My game would work by the character standing in a fixed place and when I press the left key he would appear to walk left but the background actually is moving right. And when I press the right key the background would move left making the character appear to move right. Now I would also like the character to jump when I press the up key. Now I have created a walk cycle in a movie clip and have a jump cycle that I could also use for the jump.

View 6 Replies

ActionScript 2.0 :: Jump And Boundaries (character Can Go No Further Than A Wall Or Something)

Dec 12, 2003

make a character jump by using spacebar make a boundry (character can go no further than a wall or something)

View 1 Replies

ActionScript 2.0 :: Make The Character Jump When He Is On The Platform It Doesnt Work?

Nov 15, 2006

when i try to make the character jump when he is on the platform it doesnt work.

onClipEvent(load) {
speed=7;
jumping=false;[code...

View 3 Replies

ActionScript 3.0 :: Make The Character In Flash Game Make A Jump When The Player Presses A Key?

Dec 19, 2009

i want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.

View 1 Replies

ActionScript 2.0 :: Make The Cursor Automatically Jump To The Second Input Box After The First Input Box Is Filled With A Character?

Aug 24, 2005

If i have two or more input boxes to create a crossword puzzle, how can i make the cursor automatically jump to the second input box after the first input box is filled with a character?

View 3 Replies

ActionScript 2.0 :: LocalToGlobal() - Put Four Empty Movie Clips On Each Of The Character's Base Corners?

Aug 17, 2004

I'm working on an isometric-view prototype game, and I thought a good way to do the collision detection would be to put four empty movie clips on each of the character's base corners (it's a cube), convert those corner's _x and _y to the Stage, and go from there. Problem is, how to get it to work.My character is on the stage in an otherwise empty "clip" MovieClip. Here's what I have inside my character:

Code:
onClipEvent(enterFrame){
var point:Object = new Object();
point.rightX = right._x;[code]....

Whenever I trace any of these, it always traces the local coordinates. Otherwise, everything is fine.

View 1 Replies

IDE :: Landing In A Certain Place

May 4, 2009

im looking for action script that controls if MovieClip A lands at x coordinate and y cooridnate, then make MovieClip A1 happen.

does this actionscript go on the movie clip, a button or the frame?

what is the script?

View 2 Replies

Actionscript 2.0 :: Jump Forward And Jump Back Buttons?

Jun 15, 2010

I am brand new to scripting in Flash, and was hoping I could get some help on a question. I have an animation that is 300 frames long. The first 100 frames are an animated 'ad' (for lack of a better term), the second 100 frames are a different ad, and the third 100 frames are the last ad. This can be viewed straight from beginning to end (and is intended to loop if no action is taken), but I would also like to add some functionality to the animation, so that people can jump forward to the next ad, or back to the previous ad (hitting back from the first ad would take them to the third ad, and vice versa.)

[Code]...

This does not turn up any errors when I test the movie, but the functionality does not work. Am I anywhere near a working script, or am I attempting this in a completely wrong way?

View 3 Replies

Flash Landing Page Challenge

Jun 25, 2009

I am getting ready to update a past client's website using newer web standards. This particular website has a Flash Intro on the index.html page. I have a feeling this has greatly hindered search engine activity. What would be the best way to handle keeping a Flash intro without it being logged as a main page? Or should I recommend that the client eliminate the Flash landing page?url...

View 11 Replies

ActionScript 1/2 :: Get The Landing Area To Recognize Different Symbols?

Apr 15, 2009

Alright I'm wondering how I can get the landing area to recognize different symbols and then go to a certain frame depending on what symbol is placed in the landing area

here is my code now
onMouseMove = function(){
updateAfterEvent();
}

[Code]...

View 3 Replies

IDE :: Movie Filter - Landing Page To A Website?

Nov 21, 2007

I am relatively new to Flash but learning it quickly. I have a simple image transition (motion tween) and after the transition is complete, I want it to flash blur a couple of times before stopping. It would basically be the landing page to a website. So it fades from Black to Gold and then flashes all blurry twice and then stops. I got the tween but now just need the blur.

View 1 Replies

Professional :: 2nd Scene Not Working If Landing Target Is Other Than 1st Frame

Apr 19, 2010

Ok... I have 2 scenes.... 1st scene is an intro menu with several movie clip symbols (let's call them buttons for all intents and purposes) that gotoAndPlay various sections of the 2nd scene when clicked ... The various buttons on this intro screen point to different frame numbers in the 2nd scene... button1 goes to frame 1 of scene 2... button 2 goes to frame 10 of scene 2.... button 3 goes to frame 20 of scene 2 and so on....

when I click  the 1st button, it takes me to the 2nd scene at frame 1 and correctly shows me that page ... (all 2nd scene pages have a navigation bar at the top to access the other 2nd scene pages) ... when I click on a navigation button it takes me to the next page within the 2nd scene that I am looking for and each progresive page works correctly.

[Code]....

View 6 Replies

ActionScript 2.0 :: Control Of Cursor Position In Landing Email Program When I Use Mailto?

Oct 18, 2009

Can I have a control of cursor position in the landing email program when I use mailto? I think it looks more professional when the cursor goes into Subject field rather than falling right behind my email address in To field. The following snippet that I tried didn't make any difference. [code]...

View 3 Replies

Actionscript 2.0 :: Platformer With Ground And Water?

Aug 21, 2010

i'm currently making a flash game which has ground and water.And its going to be big.For someone whos 13 like me i have problems.The script was edited recently so sorry to anyone who was working on it.the issues are underlined.here the script.

onClipEvent (load) {
grav = 2;
speed = 15;

[code].....

View 2 Replies

ActionScript 3.0 :: Slope Detection In Platformer

Jun 15, 2010

I have an art based platformer with a movie clip that is basically a triangle shaped object that serves as the slope.My problem is in the collision detection with the slope. Here's the code that i currently have - [code]This basically places the rectangle shape that serves as the main player (_rec) along the slope and increments its y position based on it's current x position. The reg point of the slope is on the bottom left.The problem is that this code comes into effect even if _rec is jumping over the triangle because of the square shaped hitbox of the slope. Also, for the same reason, I cannot jump while on the slope itself.I know of a way to rotate the character based on the incline in the ground but I don't really like that idea. The character should stay vertical at all times. I really don't want to do a tile based version as I have a lot of art already designed, it's only the ground objects that are basic shapes.

View 1 Replies

ActionScript 3.0 :: Make Coins For A Platformer?

Apr 11, 2011

how to make coins for a platformer, the video however did not show how to keep count of the coins you collect....I've tried a million things but nothing seems to work! Here is a link to the video http:[url]....what I have to do to keep track (score) of how many coins I pick up,

View 7 Replies

ActionScript 2.0 :: Flash MX Platformer Game?

Nov 3, 2011

I'm in the process of building a platformer with Flash MX using Action Script 2.0, I'm following this tutorial: [URL].. However I'm not following the tutorial, I downloaded the .fla file and followed that. The .fla file available for download functions, but my recreation does not.

I have used all the elements from the tutorial platformer, the scoring counter, the health counter, the pickups, the enemies etc. But it does not work properly.

Here is my attempt for download, can someone please explain where i've gone wrong, and if it's not too much trouble, fix it.

View 1 Replies

ActionScript 3.0 :: Platformer (Collision Between Player And Terrain)

Nov 6, 2010

I'm doing a project at the moment where I am creating a side scrolling platformer in AS3. Currently I have:

-The "Character' which is a ball that can be controlled using the arrow keys and has bounce, friction, gravity etc.
-A scrolling system, the character can move freely within an invisible inner boundary, once the character leaves this boundary the background will scroll to compensate.

The thing I am having issues with is creating collision detection between the "Character" and the "Background.Ground" so that the character can move along the shape of the Ground movieclip within the background movieclip.

Actionscript Code:
package{
import flash.display.Sprite;
import flash.events.Event;
import flash.display.MovieClip;
import flash.display.Stage;
import flash.geom.Transform;
import flash.events.KeyboardEvent;
[Code] .....

View 21 Replies

ActionScript 3.0 :: Create A Simple Platformer Game?

Dec 12, 2009

I want to create a platformer game, but there is no tutorials that actually tell you how.What I dont understand is:

- How the level changes when you get to a certain point
- How to do collision with walls
- How to make the player move

View 5 Replies

ActionScript 2.0 :: Background Scrolling For Platformer Game?

Nov 30, 2009

I'm making a simple side scrolling platform game called Kit Run. For moving left and right, I have the sprite run in place while the background scrolls in the opposite direction. However, when the sprite jumps straight up and down, the background stays stationary. What I need help with is getting the background to scroll down when the sprite moves up beyond a certain point, and up when the sprite moves down beyond a certain point. Ive tried several probably unnecessarily complicated methods that only sort of work.

View 4 Replies

ActionScript 3.0 :: Create A Scrolling Platformer Game?

Aug 10, 2010

I'm about to create a scrolling platformer game, something like Gum Drop Hop, where the background is scrolling constantly, and you have to keep running or else you'll die. Do you know any tutorials on how to do something like this? I'm not really sure how I would generate random platforms all the time...

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved