Grow and destroy

Hi,,
Hoping you can help, I'm creating an ipad game where the user controls the actor using the accelerometer. I have coins scattered randomly around the screen. How can I set it so that when the actor collects the coin, it will:
1. grow by a certain % or size each time
2. the coin will dissapear
I have used the grow rule, but at the moment the actor just keeps growing and the coin never dissapears (rule set to destroy). I have tried to put a rule in to limit the size, but I'm not sure what type of expression I might need. I hope that someone can help.
Thanks,
MC
Hoping you can help, I'm creating an ipad game where the user controls the actor using the accelerometer. I have coins scattered randomly around the screen. How can I set it so that when the actor collects the coin, it will:
1. grow by a certain % or size each time
2. the coin will dissapear
I have used the grow rule, but at the moment the actor just keeps growing and the coin never dissapears (rule set to destroy). I have tried to put a rule in to limit the size, but I'm not sure what type of expression I might need. I hope that someone can help.
Thanks,
MC
Comments
Rule on the Coins;
When overlaps/collides with player destroy this actor
Rule on the Actor;
When overlaps/collides with coin
change attribute: Self.size.width + x (where x is the amount you want to grow by, eg. 1, 2, 5, 8, whatever you want).
change attribute self.size.height + x (same as above)
Not sure I know what the "grow rule" is...
In other words, I had to limit my actor to scale for only 2 seconds
then destroy after 2.1 seconds.
I know this isn't exactly the issue you are up against, but I would start by looking at your scale settings.