I need a scripting for the following:
When sprite shown go to cotume 1
when mouse is touching sprite switch to costume 2
when not touching sprite go to costume 1
when sprite clicked go to costume 3
any help would be great thanks!
Last edited by kluspossible (2011-03-08 17:56:03)
Offline
something like this?.... http://scratch.mit.edu/projects/Ratty1967UK/1644239
Offline
[blocks]
<when green flag clicked>
<show>
<switch to costume[ costume1
<if> <touching[ mouse-pointer?
<switch to costume[ costume2
<else>
<switch to costume[ costume1
<when[ sprite ]clicked>
<switch to costume[ costume3
[/blocks]
That should help.
Offline
Another way to do this would be to first label the costumes 'true' and 'false'. Then all you need is a script that makes it forever: switch to costume (mouse down?)
Offline
Reverberated3 wrote:
Another way to do this would be to first label the costumes 'true' and 'false'. Then all you need is a script that makes it forever: switch to costume (mouse down?)
neat little trick might use that one myself... but as any C programmer will tell you, you need to be careful of using too many of them for fear of obfuscating your code!
Offline
Ratty1967UK wrote:
Reverberated3 wrote:
Another way to do this would be to first label the costumes 'true' and 'false'. Then all you need is a script that makes it forever: switch to costume (mouse down?)
neat little trick
might use that one myself... but as any C programmer will tell you, you need to be careful of using too many of them for fear of obfuscating your code!
That, and I don't think it works online.
Offline