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

#1 2009-03-24 07:57:22

take_the_fake
Scratcher
Registered: 2009-03-24
Posts: 1

query to check if an object is hidden or not

it isn't possible in the actual version to check if an object is hidden or not  tongue <show>

Offline

 

#2 2009-03-24 12:54:41

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: query to check if an object is hidden or not

You can do that with a variable. Call it anything you want, but I'm calling it "hidden".

When you use a show block, make it set hidden to 0, and when you use a hide block, set hidden to 1. Then when you make a script, if you want it to know if it's showing, use this script:

<if><( <{ hidden }> <=> 0 )>

[/blocks]and if you want to know if it's hidden:

<if><( <{ hidden }> <=> 1 )>[/blocks]

Last edited by hmnwilson (2009-03-24 12:55:24)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

Board footer