Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-22-2006, 03:26 PM   #1
Danny green
wannabe ASer
 
Join Date: Feb 2006
Location: England
Posts: 3
Send a message via MSN to Danny green
Question [AS2] Platform codes - game

Ok, im currently creating a small platformer in flash. It's standard concept, e.g moving platforms. Up to yet i have used one horizontal moving platform which worked perfectly fine. Here's the code:

onClipEvent (load) {
maxMove = 100;
maxX = _x + maxMove;
minX = _x;
moving = 3;
}
onClipEvent (enterFrame) {
if (this.hitTest (_root.hero)) {
_root.hero._y -= 1;
_root.hero._x += moving;
}
_x += moving;
if (_x >= maxX || _x < minX) {
moving = -moving;
}
}


I didn't code this. Although i do understand it. To make the game different i decided to make some platforms move vertical. I was puzzled when i changed the code above to a vertical moving code. The actual platform moved perfectly just as i predicted, the only problem was that the character was limited to how long he could stay on the platform. He would land and then suddenly appear somewhere of the platform. I'm very annoyed with this because i thought the production of my game would be more fluent. If anybody has any suggestions please let me know.

Cheers. Danny
Danny green is offline   Reply With Quote
Old 02-22-2006, 03:54 PM   #2
Danny green
wannabe ASer
 
Join Date: Feb 2006
Location: England
Posts: 3
Send a message via MSN to Danny green
Default

Anybody understand?
Danny green is offline   Reply With Quote
Old 02-22-2006, 07:22 PM   #3
Danny green
wannabe ASer
 
Join Date: Feb 2006
Location: England
Posts: 3
Send a message via MSN to Danny green
Default

cough
Danny green is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
platform game lint Gaming and Game Development 2 12-21-2006 01:18 AM
Platform Game - play movie clip once SensualManure Gaming and Game Development 0 11-14-2005 02:37 PM
[AS1] Platform game help Banana61 Gaming and Game Development 4 08-13-2004 07:06 PM
Trouble with platform in a game? buzza_gts Gaming and Game Development 0 12-15-2003 07:11 AM
HERO BOY :: platform game to check thio valone Site Check 10 07-01-2003 02:38 PM


All times are GMT. The time now is 11:41 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.