Okay, I have been trying to make this game where a stickman walks around the screen. I have tried to make it where you have to use (WASD) to make him move up, down, left and right but it wont work. How do I do this?
Hi there Monaco1!
Here is an example project of what you’re looking to do:
WASDStickman.wick (3.3 KB)
In the project, you’ll see the stickman which I’ve made into a clip. Then I added this code to the clip:
function update() {
if(keyIsDown('W')) {
this.y -= 3;
}
if(keyIsDown('A')) {
this.x -= 3;
}
if(keyIsDown('S')) {
this.y += 3;
}
if(keyIsDown('D')) {
this.x += 3;
}
}
This code basically just says, “every time the project updates, check to see if any of the WASD keys are being pressed. If they are, change the x or y coordinates of the clip in the right direction”
Please let us know if you have any other questions, @Luxapodular and I are happy to help!
Thanks, this helped alot. I love this software.
the project couldn’t open
I believe that’s because the project was created using an older version of the editor
(this thread is 2 years old after all).
Try opening the file with the legacy editor