ForumsProgramming ForumI'm Such an idiot, probably the easiest help you could give a noob

18 6028
Dannydaninja
offline
Dannydaninja
948 posts
Nomad

ACTIONSCRIPT 2.0 :
I know that for movement with the UP DOWN LEFT RIGHT Keys i use:
-----

onClipEvent (load) {
power = 3;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= power;
}
if (Key.isDown(Key.RIGHT)) {
_x += power;
}
if (Key.isDown(Key.UP)) {
_y -= power;
}
if (Key.isDown(Key.DOWN)) {
_y += power;
}
}

-----

But what about the WASD Keys for 2 Player? I tryed:

----

onClipEvent (load) {
power = 3;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.A)) {
_x -= power;
}
if (Key.isDown(Key.D)) {
_x += power;
}
if (Key.isDown(Key.W)) {
_y -= power;
}
if (Key.isDown(Key.S)) {
_y += power;
}
}

----

So what's the code for movement with the WASD keys...?

  • 18 Replies
Showing 16-15 of 18