Page 118 - CodePilot V5.0 C5
P. 118

This block is used to control the visibility of the
                                   on
                               set video transparency to  50
                                                            video feed from the webcam.






                    The ‘set video transparency to ()’ block sets how transparent the video is. 0 shows the video
                    clearly, 100 hides it completely.



                    Project 1    Sprite Reacts When You Move



                  Create a simple project where the sprite reacts to
                  your movements captured by the webcam. To create

                  a simple project using the Video Sensing extension,
                  follow the given steps:

                  Step    1    Click the Add Extension              button.

                  Step    2    Select Video Sensing extension.

                  Step    3    Remove the default sprite and add a new                           when video motion  >  10

                               sprite.
                                                                                         play sound  duck  until done
                  Step    4    Create the given script for the chosen sprite.
                                                                                          say  I am a duck!  for  2  seconds
                  Now, step in front of the webcam and wave your hand
                  or touch the sprite. The sprite will detect your movements, play the duck sound and

                  say, ‘I am a duck!’.







                                                                           Create a small project using Video
                                                                        Sensing blocks where the sprite changes
                                                                       its costume when it detects movement in
                                                                                  front of the webcam.




                      PRIVACY PRACTICES

                      Always ask for permission before turning on the webcam. Use it respectfully by not
                      recording others without their consent.







                  116     CodePilot (V5.0)-V
   113   114   115   116   117   118   119   120   121   122   123