5 ms·
You can't have shared code between sprites (IIUC), so the only sharing is via copy paste, which is unmanageable.
by lsd5you 8y ago
You can't have shared code between sprites (IIUC), so the only sharing is via copy paste, which is unmanageable.
- gbear605 8y agoYou can, however, make "clones" - essentially instances in OOP except that there has to be one initial instance.
- lsd5you 8y agoIt really never occurred to me to try that for sharing code as opposed to just having multiple of the same sprite (bullets, enemies and the like). Still it's not hugely satisfactory because it implies a single common sprite, loss of the intuitive wysiwyg aspect (such as it is), refactoring to utilise, and then presumably large 'switch' statements to recover the difference in behaviour between the clones. Also found communicating between scratch objects via the asynchronous message passing to be seemingly too slow and it would have been nice to be able to call methods on another sprite (although I assume they are trying to limit the potential for uninteruptible infinite loops and the like by having each sprite execute separately).