How do you show and display objects using blockly?

70 views
Skip to first unread message

顧昱

unread,
May 8, 2017, 11:21:21 PM5/8/17
to CoSpaces
Hi, I wonder how one would accomplish the following using blockly?

Click object A ==> displays object B
Click object A again ==> object B disappears

I can't find any block that does it. Did I miss anything?

Thanks!

Benjamin Singh

unread,
May 9, 2017, 5:28:34 AM5/9/17
to CoSpaces
Hi Gooy,

there is no exact block available to make an object appear/disappear but you can use a trick to achieve the same outcome, more or less. Example:


There is a button and a dog in the scene. When you click on the button the dog disappears and when you click again the dog shows up again. To make this happen I just make the dog so small (very quick) that you can't see him anymore using the "scale" block. To show him again I just scale him back.

Link to the example scene: https://cospac.es/tpB9


Benjamin


Gooy

unread,
May 10, 2017, 1:11:45 AM5/10/17
to CoSpaces
Thanks, Benjamin. That's very helpful!
Reply all
Reply to author
Forward
0 new messages