Making a game


#1

Hello

Can someone please explain how can I program the arrow keys in wick?
Also I am trying to create a game where I shoot a ball into a net. How do I begin.

Thanks


#2

Hi Sofia, programming the arrow keys in wick is pretty simple.
put this code in the object you want to control

function update() {
if(keyIsDown(‘UP’)) {
this.y -= 3;
}
if(keyIsDown(‘LEFT’)) {
this.x -= 3;
}
if(keyIsDown(‘DOWN’)) {
this.y += 3;
}
if(keyIsDown(‘RIGHT’)) {
this.x += 3;
}
}

You can change what keys you use by replacing words such as RIGHT and LEFT with A and D. or any other key that you want to use.

Hope this helped


#3

I’m not sure I know how to answer your second question. I’m not the best programmer. Someone else will figure it out for you.