I'm trying to make a football/soccer- type game where the net moves from side to side at the top and you have to try to get the ball in the net as many times as you can in 1 minute.
So far all i can figure out is how to get the ball to follow the mouse.. How do I make it so when you click or press the space button the ball will go up towards the net?
And how to make the net move?
Offline
For the net something like this maybe? :
when gf clicked forever if <(shooting) = [no]> repeat until <(x position) > [120]> change x by [5] end repeat until <(x position) < [-120]> change x by [-5] endThough maybe with waits or a lower x change to make it a bit slower.
when gf clicked set [shooting v] to [no] set [score v] to [0] forever set x to <mouse x> if <mouse down?> set [shooting v] to [yes] wait until <not <mouse down?>> repeat until <<<y position > > <[y position v] of [net v]>> or <touching [net v]?>> change y by [1] end if <touching [net v]?> change [score v] by [1] end end set [shooting v] to [no] endNote: These two pieces of code go together.
Last edited by BetaSmozzick (2012-12-15 15:34:56)
Offline
For to make the ball to go towards the net you could have something like:
when gf clicked forever repeat until <key [space v] pressed?>//Why won't it go blue! go to [mouse pointer v] end point towards [Goal v] repeat until <<touching [Goal v]?>or<touching [edge v]?>>// ah it has a question mark at the end move (10) steps end if <touching [Goal v]?> change [Score v] by (1) end end
Last edited by letmethink (2012-12-15 13:54:48)
Offline