From Test-Scratch-Wiki
वेरिएबल छुपाएं () | |
hide variable [ v]
| |
Category | वेरिएबल |
Type | ढेर |
Introduced in | १.३ |
वेरिएबल छुपाएं () ब्लॉक एक वेरिएबल ब्लॉक और एक स्टैक ब्लॉक है। ब्लॉक निर्दिष्ट वेरिएबल के स्टेज मॉनिटर को छुपाता है।
उदाहरण उपयोग
प्रोजेक्ट्स में जो चीजों को प्रदर्शित करने के लिए वेरिएबल्स स्टेज मॉनिटर्स का उपयोग करते हैं, डिस्प्ले को कई बार छिपाना और दिखाना पड़ सकता है; यह वेरिएबल दिखाएँ () के साथ किया जा सकता है।
- जब कोई मान संपादन योग्य न हो तो स्लाइडर को छिपाना
when this sprite clicked //मूल्य संपादन को लॉक-इन या खोलने के लिए एक बटन if <(editable) = [yes]> then hide variable [width v] set [editable v] to [no] else show variable [width v] set [editable v] to [yes]
- खेल के अंत में स्कोर छिपाना
when gf clicked set [points v] to (0) set [status v] to [running] show variable [points v] repeat until <not <(status) = [running]>> go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180)) set [lastTime v] to (timer) wait until <<((timer) - (lastTime)) > (.3)> or <<mouse down> and <touching (mouse-pointer v)?>>> if <<mouse down> and <touching (mouse-pointer v)?>> then change [points v] by (1) play sound (pop v) if <(points) = [10]> then set [status v] to [win] end end if <(timer) > (10)> then set [status v] to [lose] end end broadcast (status) wait (2) secs hide variable [points v]
- जब वेरिएबल का कोई उपयोग नहीं रह जाता है
when I receive [game end v] hide variable [score v]
- वन स्प्राइट वन स्क्रिप्ट प्रोजेक्ट्स में संदेश प्रदर्शित करना
if <(health) < (previous health)> then set [readout v] to (([you lost ] + (health lost)) + [ health]) show variable [readout v] wait (0.5) secs hide variable [readout v] end