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

#1 2011-12-04 03:56:45

toytttttt
Scratcher
Registered: 2011-10-08
Posts: 6

Variable additions and solidity

There should be the ability to say, when variable one's number reaches a certain amount you can set something like play sound or move 10 steps or pen down or anything like that. Scratch also needs an easy setting to make sprites not pas through each other, in other words, make things solid.

Offline

 

#2 2011-12-04 04:18:58

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Variable additions and solidity

First problem's solution:

Code:

{When green flag clicked}
Forever:
|If (Variable)=(Value)
||[Broadcast [Reached]]

{When I receive [Reached]}
|[Pen down] // or whatever

Second:

Code:

{When green flag clicked}
Forever:
|If <Touching [solid sprite]>
||[set [CANMOVE] to [1]]
|else
||[set [CANMOVE] to [0]]

Then, instead of
[Move (10) steps]
Use

Code:

if (CANMOVE=1)
|[Move (10) steps]

Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#3 2011-12-04 08:24:10

toytttttt
Scratcher
Registered: 2011-10-08
Posts: 6

Re: Variable additions and solidity

Thank you!

Offline

 

Board footer