http://scratch.mit.edu/projects/Dignified/2474360
I know there are a few bugs and I don't know how to fix them. There are two charactors to help you find the bugs. Can people please help me find solutions. If so it would be great!
Offline
to stop sprites going through walls:
forever if <key [left v] pressed> change x by (variable)//this can be any number or variable if you've used that instead if <touching [walls v]>//or colour blue, just that I'm not totally sure how to do colours on ScratchBlocks! change x by ((variable)*-[1]) end end if <key [right v] pressed> change x by (variable) if <touching [walls v]> change x by ((variable)*[-1])There is another way involving changeing direction but this is what I use.
Offline
can anyone tell me how to write "key left pressed" in scratchblocks so it works!!!
and also, sorry! the second blue block was meant to be like the last green block. I'm new!
Offline
it needs a question mark at the end
Also, that script just makes you go left all the time.
Also, it's good to give variables meaningful names, this one looks like it should be called 'speed'
Also to do colours, just type it in hexadecimal inside square brackets (look it up on wikipedia)
forever if <key [left v] pressed?> change x by (speed) if <touching color [#0000ff]?> change x by ((speed)*[-1]) end end if <key [right v] pressed?> change x by ((speed)*[-1]) if <touching color[#0000ff]?> change x by (speed)Script fixed!
Last edited by joefarebrother (2012-04-18 15:57:03)
Offline