I've made a text sprite with 10 or so costumes which I scripted it to change to when the score is a certain value (eg: score is 60, sprite changes to 'decent') but I can't seem to get it to work.
Currently I have it so that the sprite remains hidden until the end screen, then when it receives the 'end of game' broadcast which comes up after a time, then having an IF Score = X - Y switch to costume B, listed with costumes for certain number brackets.
The score sprite just remains on the default costume, as if there were no scripts.
Offline
Use this format:
<if><( Score <<> 10 )>
...Change Costume to:
<else>
<if> <( Score <<> 20 )>
...Change costume to:
<else>
<if> <( Score <<> 30 )>
...Change costume to:
And so on. This should work nicely.
Last edited by TheSaint (2010-11-24 13:34:02)
Offline
Thanks.
Offline
TheSaint wrote:
Use this format:
(snip)
And so on. This should work nicely.
But it's inefficient.
Are you changing the costume every multiple of 10 (or any other certain number)? And are the costumes in order? In that case:
switch to costume (score/10)
Though if you aren't changing at multiples then you might have to go with Saint's method. Or just add redundant costumes (but that might be even more inefficient, idk, depends on whether you care about project size or not).
Last edited by S65 (2010-11-24 20:31:11)
Offline