This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Suggestions
  •  » add a "if (instert anything) again (instert numbers or whatever) ",

#1 2012-01-11 10:17:28

BloodFeatherGem123
New Scratcher
Registered: 2012-01-11
Posts: 10

add a "if (instert anything) again (instert numbers or whatever) ",

Well a block called "add (instert anything) again", "add (instert anything) again (instert numbers or whatever) times and a "if (instert) does/and (instert anything) again then:
(instert blocks)
else:
(instert blocks)
Now imagine if you put in a if/if and else block but what if you wanted it to do something again if you do the thing (any numbers)  times then it will do whatever blocks you put in:
heres an example howit works:


If sprite1 clicked:
move 10 steps
if sprite1 clicked again/clicked 4 times:
say: Hello!
Stop this script

and:
If:
<{[blocks]sprite 1 clicked[/blocks]}>
<move([blocks] 10  )steps[/blocks]>
If clicked again:
<move([blocks] 30  )steps[/blocks]>

Offline

 

#2 2012-01-11 10:29:13

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: add a "if (instert anything) again (instert numbers or whatever) ",

Umm... Well I think I see what it is but you can easily use variables to alternate between different actions.

Offline

 
  • Index
  •  » Suggestions
  •  » add a "if (instert anything) again (instert numbers or whatever) ",

Board footer