I have three costumes. I want them to switch costume depending on how many points there is, for e.g.
if there are 1-25 points switch to costume 1
if there are 26-50 points switch to costume 2
if there are 51-76 or over points switch to costume 3
plz help!
Offline
Here you go!
When Green Flag Clicked
Set points to 0
Forever
if points < 26
switch to costume 1
else
if points <51
switch to costume 2
else
switch to costume 3
and in blocks:
[blocks]
<when green flag clicked>
<set{ points }to( 0
<forever>
<if> <( <{ points }> <<> 26 )>
<switch to costume[ 1
<else>
<if> <( <{ points }> <<> 51 )>
<switch to costume[ 2
<else>
<switch to costume[ 3
<end>
<end>
<end>
[/blocks]
I hope that helped!
Last edited by shadow_7283 (2010-07-11 09:31:06)
Offline
If you wanted this to increase every 25 points, with a very large number of possible costumes to switch to, you could use this:
The problem with this is that if it's possible for your score to decrease, the costume won't change back. Also, it has to land exactly on 26, 51, 76, etc. for this to work.
Offline