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

#1 2012-05-04 09:39:56

nicoleandmax
Scratcher
Registered: 2009-07-11
Posts: 1

Urgent Helppp

I need a script that allows me to let a brick be hit two times before it disappears. Any help????????????????????



Thanks!!

Offline

 

#2 2012-05-04 10:26:54

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: Urgent Helppp

nicoleandmax wrote:

I need a script that allows me to let a brick be hit two times before it disappears. Any help????????????????????

Thanks!!

when gf clicked
switch to costume [intact v]
set [hit? v] to [0]
forever
if <<touching [mouse-pointer v] ?> and <mouse down?>>
next costume
change [hit? v] by (1)
if <(hit?) = [2]>
wait (0.1) secs
hide
Hope it helps.  big_smile

Last edited by jontmy00 (2012-05-04 10:27:12)


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#3 2012-05-04 15:54:23

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

Re: Urgent Helppp

Try this:

when gf clicked
if <touching [mouse-pointer v]?> and <mouse down?>
wait [1] second
wait until <touching [mouse-pointer v]?> and <mouse down?>
hide
end


-SOScratch
Scratch On!

Offline

 

#4 2012-05-04 16:53:49

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Urgent Helppp

when [brick] clicked
change [hit_counter] by (1)

when gf clicked
show
set [hit_counter] to (1)
wait until <(hit_counter) > (2)>
hide
P.S.:

@jontmy00's script: you'll want to stick a
wait until <not <mouse down?>>
block in there.

Last edited by MoreGamesNow (2012-05-04 16:55:32)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer