GenChico wrote:
Hi Guys, i need some help on a Halo 4 inspired game. I need help making the brute fire his gun. Link to project:http://scratch.mit.edu/projects/GenChica/2931221
Hate that new scratchers can't edit posts... I want him to fire every time you press space.
Offline
Okay, I see the problem. In your brute, you have a script like this:
when [space v] key pressed go to [brute v] show repeat until <not <(Master Chief Life) = (0)>> wait (1) secs point towards [master chief v] wait (0.000001) secs forever if <not <(touching [master chief v]?) or (touching color [#fcff00]?)>> move (10) steps
when [space v] key pressed go to [brute v] show wait (1) secs point towards [master chief v] wait (0.000001) secs repeat until <(touching [master chief v]?) or (touching color [#fcff00]?)> move (10) steps end
Offline
ErnieParke wrote:
Okay, I see the problem. In your brute, you have a script like this:
when [space v] key pressed go to [brute v] show repeat until <not <(Master Chief Life) = (0)>> wait (1) secs point towards [master chief v] wait (0.000001) secs forever if <not <(touching [master chief v]?) or (touching color [#fcff00]?)>> move (10) steps
First of all, you'll need to remove the first repeat until loop. Then, you might want to remove the not in the forever if and replace the forever if with a repeat until loop. Make sure it looks like this:when [space v] key pressed go to [brute v] show wait (1) secs point towards [master chief v] wait (0.000001) secs repeat until <(touching [master chief v]?) or (touching color [#fcff00]?)> move (10) steps end
And once you've done that, you're game should be up and running.
I hope that this helps!
Thanks, Ernie. Now it works, i will put credit in my project notes.
Offline
GenChico wrote:
ErnieParke wrote:
Okay, I see the problem. In your brute, you have a script like this:
when [space v] key pressed go to [brute v] show repeat until <not <(Master Chief Life) = (0)>> wait (1) secs point towards [master chief v] wait (0.000001) secs forever if <not <(touching [master chief v]?) or (touching color [#fcff00]?)>> move (10) steps
First of all, you'll need to remove the first repeat until loop. Then, you might want to remove the not in the forever if and replace the forever if with a repeat until loop. Make sure it looks like this:when [space v] key pressed go to [brute v] show wait (1) secs point towards [master chief v] wait (0.000001) secs repeat until <(touching [master chief v]?) or (touching color [#fcff00]?)> move (10) steps end
And once you've done that, you're game should be up and running.
I hope that this helps!Thanks, Ernie. Now it works, i will put credit in my project notes.
Your welcome! And also, great job on your game!
Offline