I was just thinking that it'd be easier(as in, more possible) if in
"sensing" you made a "receive message...". That way you could receive
something multiple times and get a different result each time. like:
"when I receive message* switch to costume1 wait until I receive* switch
to costume2". I've been working on a project for a while now, and it probably won't work without this block. (^.,.^) <(ps that thing is a cat.)
[blocks]<when I receive[ message1
<switch to costume[ 2
<wait until> I receive: message1
<switch to costume[ 3
<wait until> I receive message1
<play sound[ dripdrop
<wait( 1 seconds
<wait until> I receive message1
<switch to costume[ 4
Offline
**REVISED AT BOTTOM**
This is already possible (ish) using variables (But you are just better of going, when I recieve-Blah Blah do this because below is more complicated)I have done it in a few of my projects what you have to do is this:
<when I receive[ a message
<if> <( <{ costume }> <=> 1 )>
<set{ costume }to( 2
<switch to costume[ 2
Sadly you would have to repeat this over and over changing various things for it to work with more than one command:
<when I receive[ a message
<if> <( <{ costume }> <=> 1 )>
<set{ costume }to( 2
<switch to costume[ 2
<when I receive[ a message
<if> <( <{ costume }> <=> 2 )>
<set{ costume }to( 3
<switch to costume[ 3
<when I receive[ a message
<if> <( <{ costume }> <=> 3 )>
<set{ costume }to( 4
<switch to costume[ 4
Hope this helped!
Thanks
P110
-----------------------------------
Head of Monkey Banana
**REVISED**
There is another way that only uses 2 scripts (add one for every different sprite command comes from) and variables, there are 2 parts to it (only edit the variables all other code should be kept same):
<when I receive[ run commands )>
<if> <( <{ command }> <=> command1 )>
(put action here)
<else>
<if> <( <{ command }> <=> command2 )>
(put action here)
<else>
<if> <( <{ command }> <=> command2 )>
<end>
(add a new if section for each command)
Here is the sending part:
<set{ command }to( command1
<broadcast[ run commands )>
You would have to add parts to the sending part for different scenarios, but at the moment this is all very complex, so you are most probably best off just using a when i receive block for every different command sorry I couldn't be more of a help.
Thanks
P110
-------------------------------------------------
Monkey Banana team-scratcher
Last edited by P110 (2012-01-10 15:16:45)
Offline