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

#1 2010-11-02 13:10:25

gruff123
New Scratcher
Registered: 2010-08-29
Posts: 2

How to crate direction arrows

Can someone please tell me a simple way to add arrows to a scratch and when you click them the stage background will change?
Because i want to create a escape the room with the arrows.

Offline

 

#2 2010-11-02 17:29:57

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How to crate direction arrows

Since you're doing an escape room, I'm gonna do this for four walls, okay?

When Flag Clicked
Set (direction) to (1)
Forever
  If (mouse down? and touching mouse)
    If (direction=4)
       set (direction) to (1)
    else
       change (direction) by (1)
  wait until (not (mouse down))
end

For the right arrow, and for the left arrow, basically the same thing except switch the 4 and the 1 in the "if (direction=)" part, and the else should change it by -1.
Then, set up your backgrounds so that the are in order so that turning right is the equivilant of changing your background# by 1.  Name them so that room 1's backgrounds are: 11, 12, 13, and 14: room 2's: 21, 22, 23, and 24 etc.

Put this in your background:

When Flag Clicked
Forever
  switch to background (join (room)(direction))
end


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2010-11-02 22:02:53

gruff123
New Scratcher
Registered: 2010-08-29
Posts: 2

Re: How to crate direction arrows

Can you add scratch blocks i dont rly get it

Offline

 

#4 2010-11-03 17:06:15

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How to crate direction arrows

gruff123 wrote:

Can you add scratch blocks i dont rly get it

Hold on, I'll make a mock up.
http://i56.tinypic.com/hvq98n.gif

http://i55.tinypic.com/xgi5gw.gif

http://i53.tinypic.com/2yzbmvt.gif

Hopefully those help.

Last edited by AtomicBawm3 (2010-11-03 17:14:15)


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#5 2010-11-03 22:08:44

RocksAndFire
Scratcher
Registered: 2010-04-17
Posts: 1000+

Re: How to crate direction arrows

I did it a bit differant....Pretty simple.

See my project GREED (Demo) TOO LAZY TO PUT A LINK

Offline

 

Board footer