im making this RPG game wer ur guy follows around ur mouse but im having trouble making the guy NOT go thru my walls.
Offline
You could try making your player move right, and if it's touching a wall (which can be a sprite or color), it should 'bounce' back.
Offline
Here is the script:
^^ Click that to see how it works online!
EDIT: Change the color on the “if touching color” block to be the same color(s) as the walls.
Last edited by henley (2011-06-27 15:30:32)
Offline
Or, like in the PacMan project in the games section on the program, you can have a certian colour as background and have a script like this:
[blocks]
<when green flag clicked>
<if><touching color[ background ]>
<move( 3 )steps>
[/blocks]
Im new to the scratch blocks, so if it dosent show, i really dont know
Offline
DigiTechs wrote:
Or, like in the PacMan project in the games section on the program, you can have a certian colour as background and have a script like this:
[blocks]
<when green flag clicked>
<if><touching color[ background ]>
<move( 3 )steps>
[/blocks]
Im new to the scratch blocks, so if it dosent show, i really dont know
That won’t make it stop going through walls. Unless the walls are as wide/tall as the sprite.
And that won’t make it follow the mouse.
And I already posted a solution.
Offline