ScratchData LogoScratchData
Back to _nix's profile

Two threads, one script (one target)

_N_nix•Created January 29, 2021
Two threads, one script (one target)
13
5
147 views
View on Scratch

Description

Demo showing the "stack click threads and hat threads can coexist" behavior of Runtime.startHats. This shows precedent for more than one thread of the same script/hat executing (existing) simultaneously. (Please note you can't start more than two threads with this mechanism. Clicking the "broadcast" block twice will just reset the existing non-click thread - note how the sprite never moves faster than 2 * 2 units per frame.) https://github.com/LLK/scratch-vm/blob/93780400cd05ce9da2c081ac0f3c96fbb6a5af01/src/engine/runtime.js#L1810-L1835

Project Details

Project ID481000380
CreatedJanuary 29, 2021
Last ModifiedJanuary 30, 2021
SharedJanuary 29, 2021
Visibilityvisible
CommentsAllowed