ScratchData LogoScratchData
Back to 2grw's profile

test 2

2G2grw•Created October 7, 2024
test 2
0
0
4 views
View on Scratch

Instructions

const target = vm.runtime.getTargetForStage(); const questionVarName = '?'; const executeVarName = 'execute'; function getVariableByName(name) { return Object.values(target.variables).find(variable => variable.name === name); } function waitForVariable() { const questionVar = getVariableByName(questionVarName); const executeVar = getVariableByName(executeVarName); if (questionVar && Number(questionVar.value) === 1) { questionVar.value = 0; if (executeVar) { try { eval(executeVar.value); } catch (error) { } } executeVar.value = ''; setTimeout(waitForVariable, 100); } else { setTimeout(waitForVariable, 100); } } const questionVar = getVariableByName(questionVarName); if (questionVar) { questionVar.value = 'start'; } waitForVariable();

Project Details

Project ID1078133920
CreatedOctober 7, 2024
Last ModifiedOctober 12, 2024
SharedOctober 7, 2024
Visibilityvisible
CommentsAllowed