easiest way?
make your 'create sprite' block broadcast 'scratch-spritecreated'!
hard way?
ask nXIII!
Offline
LS97 wrote:
easiest way?
make your 'create sprite' block broadcast 'scratch-spritecreated'!
hard way?
ask nXIII!
so i make my clone block brodcast something.
But how do i make a hat block
Thanks
Offline
hat blocks are generally created under Scratch-Blocks -> nameOfHatBlock.
but to make it easy for yourself you could simply modify the 'when i receive' hat block to take clonecreated broadcasts!
Offline
LS97 wrote:
easiest way?
make your 'create sprite' block broadcast 'scratch-spritecreated'!
hard way?
ask nXIII!
Wait...isn't that the hard way?
I think I just made it a little syntactically nicer by making a HatBlockMorph subclass. You can just copy-paste most of the code from the green-flag-hat class (I forget what it's called)
Last edited by nXIII (2010-11-05 15:41:26)
Offline
nXIII wrote:
LS97 wrote:
easiest way?
make your 'create sprite' block broadcast 'scratch-spritecreated'!
hard way?
ask nXIII!Wait...isn't that the hard way?
![]()
I think I just made it a little syntactically nicer by making a HatBlockMorph subclass. You can just copy-paste most of the code from the green-flag-hat class (I forget what it's called)
so i find the green hat class and copy it over and change it slightly
Offline
In the title, you typed NX111, not nXIII
Offline
me450 wrote:
ok so i used LS97's method and made it brodcast it but how do i only broadcast it to a new clone
well, then you'll have to do one of these two things:
- make a eventhatblockmorph's subclass and make that test whether that sprite is a clone or not
- use nXIII's <i am a clone> block with the broadcast (look for it in the forums)
Offline
LS97 wrote:
me450 wrote:
ok so i used LS97's method and made it brodcast it but how do i only broadcast it to a new clone
well, then you'll have to do one of these two things:
- make a eventhatblockmorph's subclass and make that test whether that sprite is a clone or not
- use nXIII's <i am a clone> block with the broadcast (look for it in the forums)
I think what he/she means is how they would broadcast the message to the clone when it is created. In this case, I would use the (is it eventReceived:?) method to send an event to just the newly created clone.
Offline
nXIII wrote:
LS97 wrote:
me450 wrote:
ok so i used LS97's method and made it brodcast it but how do i only broadcast it to a new clone
well, then you'll have to do one of these two things:
- make a eventhatblockmorph's subclass and make that test whether that sprite is a clone or not
- use nXIII's <i am a clone> block with the broadcast (look for it in the forums)I think what he/she means is how they would broadcast the message to the clone when it is created. In this case, I would use the (is it eventReceived:?) method to send an event to just the newly created clone.
oh -- ok nvm my suggestion sorry. i'll read posts better in the future
Offline