Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-12-2008, 03:33 PM   #1
ThePearl
Member
 
Join Date: May 2008
Posts: 53
Default Platform game with a gun?

Hi there! You might have noticed that I posted this both in AS2 and AS3. That's because I know how to create a basic platform game in both languages but I need help with including a gun.

So, just a 2 or 4 directional gun, like in Cave Story, I wanna be the guy and many many more.

I tried by my own, changing a variable every time you hit a button, for example;

ActionScript Code:
onClipEvent(enterFrame) {            if (Key.isDown(Key.LEFT)) {         left = 1;         right = 0;         _x -= xspeed     }     if (Key.isDown(Key.RIGHT)) {         right = 1;         left = 0;         _x += xspeed             }

Just example code, should work.(?)
ThePearl is offline   Reply With Quote
Old 09-12-2008, 03:40 PM   #2
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

Please keep your questions to one thread : ) Thanks!

I've kept this one because it had more code to work with.
__________________
(6)
senocular is offline   Reply With Quote
Old 09-12-2008, 03:53 PM   #3
ThePearl
Member
 
Join Date: May 2008
Posts: 53
Default

Oh ok, sorry then. Thanks for keeping one had two because I'm thinking of changing to AS3 but I'm not sure, I'll prob. stay at 2 anyway

I'll stay online for a while so keep posting : )

Last edited by ThePearl; 09-12-2008 at 04:03 PM.
ThePearl is offline   Reply With Quote
Old 09-12-2008, 09:19 PM   #4
ThePearl
Member
 
Join Date: May 2008
Posts: 53
Default

Oh cmon I really need help, can't find anything on the web
ThePearl 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 jumper - type game the_r Gaming and Game Development 5 10-08-2007 04:59 PM
[AS2] Platform codes - game Danny green Gaming and Game Development 2 02-22-2006 07:22 PM
Platform Game - play movie clip once SensualManure Gaming and Game Development 0 11-14-2005 02:37 PM
Trouble with platform in a game? buzza_gts Gaming and Game Development 0 12-15-2003 07:11 AM


All times are GMT. The time now is 07:42 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.