Script starting is complex and inefficient
Complex mechanism for firing up scripts. Events with string names are passed around and strings compared (sigh) Lots of stupid isKindOf: nonsense to find relevant tiles to check for scripts.
See ScratchStageMorph>broadcastEventNamed:with:
ScratchSpriteMorph>eventReceived: :-(
Side remark: I never looked in detail to scratch sources, but there is a feature I discovered recently: event sending can use computed event names, pls see example.
And 'outside world' can send in events, which are not enumerated by nature.
This feature could explain some string compare on event names. Usage of variable names is not possible to the receiver side.
This feature is useful for
- storing events in lists and replay them
- building commands for external software, like "robot_move_axis(1,300)"
That is rather cool.