creating a counter
mcmunchly
Member Posts: 2
How do I make a counter?
I tried making an actor and giving it an integer attribute called counter and setting to 10.
Then I create the actor when hold the mouse down. Then the actor has two rules.
The first rule says when self.counter is larger than one set self.counter to self.counter-1.
The second rule says when self.counter = 0 destroy the actor.
The actor never gets destroyed so something isn't working.
I tried making an actor and giving it an integer attribute called counter and setting to 10.
Then I create the actor when hold the mouse down. Then the actor has two rules.
The first rule says when self.counter is larger than one set self.counter to self.counter-1.
The second rule says when self.counter = 0 destroy the actor.
The actor never gets destroyed so something isn't working.
Comments