1

PSET01

Quick question about Scratch, can you set global scoped FUNCTIONS (or blocks?) that i can reuse across sprite scripts? Example would be creating a custom animation function for "next costume", where you can pass an integer/decimal value for seconds to wait until next costume.......

enter image description here

1 Answer 1

1

No I don't think this is possible. Each script is for the sprite it was written for.

5
  • Thanks ChrisG - I thought with Global Variables (across scripts), there might be the same for functions.
    – garfbradaz
    Commented Aug 26, 2015 at 19:22
  • Maybe you could mimic the behavior of a global function using broadcasts. And then catch that broadcast in every script and do something about it. But it will be a little slow I think. Did you understand how I meant the usage of broadcasts as functions?
    – ChrisG
    Commented Aug 26, 2015 at 19:24
  • Thanks Chris - Yeah i was thinking of broadcasts. I think for ease of getting PSET0 done, i will write the block for each script. Answer marked.
    – garfbradaz
    Commented Aug 26, 2015 at 19:26
  • You can see the relevant request of the future here scratch.mit.edu/discuss/topic/12015
    – ChrisG
    Commented Aug 26, 2015 at 19:27
  • If this answers your question please accept it by clicking the gray check-mark to the left, so that it becomes green. You can also vote it up by pressing the up arrow above the check-mark. And don't forget to keep coding!
    – ChrisG
    Commented Aug 26, 2015 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .