This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-07-16 13:01:40

pokemongardevoir
Scratcher
Registered: 2009-10-18
Posts: 1000+

Help please?

I want to make a minigame. I need the maze background and character to show when it recieves a broadcast. I want the character to not be able to pass the black walls, but i dont want it to restart when it touches black. I already tried copying scripts from another game but it won't work. Any suggestions?


http://i48.tinypic.com/n50dt.gifhttp://tiny.cc/oj6plwhttp://tiny.cc/creepforum
My website has been approved by the Scratch Team.  (^_^)

Offline

 

#2 2011-07-16 13:07:04

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help please?

So, your question is relating to the movement through the maze, right? The easiest way would be to just have the character move backwards when it touches the wall. That only really works if the movement is controlled by changing the direction the sprite is pointing in though. You can make sensor sprites to test which side of the sprite is touching the wall and adjust accordingly, which is much more polished but also a bit more work. So, which solution would you prefer of those two?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-07-16 13:10:29

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: Help please?

You could use sensing, but it's a little more advanced. There are some tutorials made by other scratchers too.

Offline

 

#4 2011-07-16 13:10:33

pokemongardevoir
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Help please?

I tried copying sensor sprite scripts but the character wouldn't even move. I'll try the direction thing though.


http://i48.tinypic.com/n50dt.gifhttp://tiny.cc/oj6plwhttp://tiny.cc/creepforum
My website has been approved by the Scratch Team.  (^_^)

Offline

 

Board footer