ok, so this may sound simple, and it can be moved to all about scratch if needed, but its a fairly advanced game(or at least it will be) so im putting this here. So, on to the problem. Im making a strategy game called ants, about an ant colony which has to spread to all 4 yards, which have different temperatures. now the problem is, that to calculate the points that you have to spend on temperature resistances and egg hatching rates are determined by the amount of ants in all of the yards put together times 0.1. the script looks like this:
<when green flag clicked>
<forever>
<set{ points }to( # of ants * 0.1
this makes it so that it constantly updates the score, but when this script is run to change the points by -18:
<when[ + heat resistance ]clicked>
<change{ points }by(-18
the points don't subtract, because it still updates to the # of ants * 0.1.
Any help? Thanks
urhngry
EDIT: oh and what do u think of the music? im not much of a composer. the music is based off of at least what i can remember of the sim ant music.
Oops, forgot the link. Here it is: http://scratch.mit.edu/projects/urhungry/815975
Last edited by urhungry (2009-12-23 02:37:21)
Offline
Try this:
<set{ Points }to( (( <{ # of ants }> <*> 0.1 )) <-> <{ Subtract points }> )) [/blocks]
Then set <{ Subtract points }> [/blocks] to the total number of points that need to have been subtracted from your point total throughout the game.
Last edited by bigreader (2009-12-23 16:02:36)
Offline