I am making a game where a stickman is running and dodging obstacles. How do I make him jump and crouch on command?
PLEASE HELP ME
I am making a game where a stickman is running and dodging obstacles. How do I make him jump and crouch on command?
PLEASE HELP ME
Here’s an interactive stick figure that can run, jump, crouch. Let me know if this works.
I cant view the file because I am working from my school computer, can you send me the code?
Here’s the code this project uses. Unfortunately, you also need a clip which is designed for this code for it to work.
function keyDown(key) {
if (key === "RIGHT") {
this.gotoAndStop("run");
} else if (key === "UP") {
this.gotoAndStop("jump");
} else if (key === "DOWN") {
this.gotoAndStop("crouch");
}
}
function keyReleased() {
this.gotoAndStop("idle");
}
How can I make this work for my project?