Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Procedures as data
- Slam-
-
100+ posts
Procedures as data
Is there a way to store procedure as data in Scratch (I know its possible in Snap!), without cascade of if-else?
I want to make OOP methods for clones.
I want to make OOP methods for clones.
- ContourLines
-
500+ posts
Procedures as data
without cascade of if-else?So you mean like a piece of scratch code in a variable? In that case, you'd have to create a system of encoding scratch blocks into a string, which you'd then interpret when needed. Is there a way to store procedure as data in Scratch (I know its possible in Snap!),
I want to make OOP methods for clones.
- robowiko123
-
51 posts
Procedures as data
As far as I'm aware that isn't possible – if you want to implement something like that, you will need to cascade if statements
- Discussion Forums
- » Help with Scripts
-
» Procedures as data