Self explanatory.
Offline
How do you change how your car looks on a Wednesday?
Offline
Make An Online Sensor Like This:
[blocks]<when green flag clicked>
<set{ online? }to( no
<move( (( 0 <*> 0 )) )steps>
<set{ online? }to( yes [/blocks]
Then Do Like:
[blocks]<if><( <{ online? }> = yes )>
do something
<else>
do something else
<end>[/blocks]
Hope This Helps!
Last edited by TheGameMaster1231 (2010-05-17 19:29:29)
Offline
TheGameMaster1231 wrote:
Make An Online Sensor Like This:
[blocks]<when green flag clicked>
<set{ online? }to( no
<move( (( 0 <*> 0 )) )steps>
<set{ online? }to( yes [/blocks]
...
How does that work?
Last edited by coolstuff (2010-05-17 19:33:33)
Offline
coolstuff wrote:
TheGameMaster1231 wrote:
Make An Online Sensor Like This:
[blocks]<when green flag clicked>
<set{ online? }to( no
<move( (( 0 <*> 0 )) )steps>
<set{ online? }to( yes [/blocks]
...How does that work?
Offline Can't Do 0 * 0 And Gives An Error So It Wouldn't Get To set online to yes And Would Be Stuck With No. But Online Ignores Errors Like That And Would Continue Onto set online? to yes.
(A Bit Confusing, Isn't It?)
Last edited by TheGameMaster1231 (2010-05-17 19:39:41)
Offline
TheGameMaster1231 wrote:
coolstuff wrote:
TheGameMaster1231 wrote:
Make An Online Sensor Like This:
[blocks]<when green flag clicked>
<set{ online? }to( no
<move( (( 0 <*> 0 )) )steps>
<set{ online? }to( yes [/blocks]
...How does that work?
Offline Can't Do 0 * 0 And Gives An Error So It Wouldn't Get To set online to yes And Would Be Stuck With No. But Online Ignores Errors Like That And Would Continue Onto set online? to yes.
(A Bit Confusing, Isn't It?)
Um.... that's my online sensor, and it's 0/0, not 0*0. The thing is, the Java player ignores errors, whereas Squeak just highlights the block in red and stops the script.
Offline
nXIII wrote:
TheGameMaster1231 wrote:
coolstuff wrote:
How does that work?Offline Can't Do 0 * 0 And Gives An Error So It Wouldn't Get To set online to yes And Would Be Stuck With No. But Online Ignores Errors Like That And Would Continue Onto set online? to yes.
(A Bit Confusing, Isn't It?)
Um.... that's my online sensor, and it's 0/0, not 0*0. The thing is, the Java player ignores errors, whereas Squeak just highlights the block in red and stops the script.
I see - ingenious! I've found the contrary to be true when dealing with lists, however: Java stops the script if you try to access a list item that doesn't exist, Squeak highlights the list in red then continues on.
Offline
coolstuff wrote:
nXIII wrote:
TheGameMaster1231 wrote:
Offline Can't Do 0 * 0 And Gives An Error So It Wouldn't Get To set online to yes And Would Be Stuck With No. But Online Ignores Errors Like That And Would Continue Onto set online? to yes.
(A Bit Confusing, Isn't It?)
Um.... that's my online sensor, and it's 0/0, not 0*0. The thing is, the Java player ignores errors, whereas Squeak just highlights the block in red and stops the script.
I see - ingenious! I've found the contrary to be true when dealing with lists, however: Java stops the script if you try to access a list item that doesn't exist, Squeak highlights the list in red then continues on.
HA! I never noticed that...
Yes, there are a lot of different online "sensor" script hacks, some more easily understandable than others; for example, I've even seen a graphics hack with color sensing that tells if the sprite is online! I like this one, though, because it is relatively compact and 1s1s (and I made it
)
Last edited by nXIII (2010-05-18 14:31:14)
Offline
Special broadcasts only work offline. Instead of saying [blocks] <when green flag clicked> [/blocks] say [blocks] <when I receive[ Scratch-StartClicked ]> [/blocks]
Offline
Billybob-Mario wrote:
Special broadcasts only work offline. Instead of saying [blocks] <when green flag clicked> [/blocks] say [blocks] <when I receive[ Scratch-StartClicked ]> [/blocks]
Good Call... I Forgot About That One...
Offline
Billybob-Mario wrote:
Special broadcasts only work offline.
What do you mean SPECIAL broadcasts? I didn't know there were different kinds of broadcasts.
Offline
Billybob-Mario wrote:
Special broadcasts only work offline. Instead of saying [blocks] <when green flag clicked> [/blocks] say [blocks] <when I receive[ Scratch-StartClicked ]> [/blocks]
That gives me an Idea for my OS...
Offline