Multiplier

run into a bit of a brick wall with this one, probably due to my non-existant math skills, im sure what i am trying to do is simple enough so i wonder if any1 can help....
basically i want to know how i should go about having it so when multiple actors are destroyed (i.e more than 2) the multiplier will go up.....and also how to get this to affect the score. (like Geometry Wars 2)
e.g
2 enemies killed = x2 multiplier
3 enemies killed = x3
4 enemies killed = x4
etc...
cheers
basically i want to know how i should go about having it so when multiple actors are destroyed (i.e more than 2) the multiplier will go up.....and also how to get this to affect the score. (like Geometry Wars 2)
e.g
2 enemies killed = x2 multiplier
3 enemies killed = x3
4 enemies killed = x4
etc...
cheers
Comments
rule when dead
game.dead_count = game.dead_count + 1
rule in score:
game.score = game.score * game.dead_count
tada!
i can get the 'multiplier' to count up with the amount of enemies that have been killed overall with the game.multiplier to game.multiplier+1 in the enemy actor
but when i try and get score to multiply by the 'Multiplier' it doesn't work with game.score to game.score*game.multiplier
last thing i need to do for my game to be fully playable
if you are counting up the multiplier each time an enemy dies and that count is increasing and you are sure it is increasing then logically multipying the score by the multiplier will yield the multiplied score.
what is the error you are experiencing?
You should be using Change Attribute, not Constrain Attribute for this as you only want the score to be mathed once. If you use constrain attribute you will get unexpected behavior (well, actually you will get a really huge number like 2billion)
*ENEMY*
--------------------------------------------------------
Rule
Actor receives event, overlaps and collides with actors of type 'blast'
Destroy
Change attribute
game.score --- game.score+100
Change Attribute
game.targets destroyed --- game.targets destroyed+1
Change Attribute
game.multiplier --- game.multiplier+1
--------------------------------------------------------------------
then in my score actor i have....
Display Text
game.score
Change Attribute
game.score --- game.score*game.targets destroyed (have tried this with multiplier also)
the multiplier is counting up with the score (although its doing it for 1 enemy killed atm as well)
but there seems to be not any calculating being done, cant tell without seeing the attribute values while testing either