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.(?)