Coding Trouble


  • Posts: 16
I have this piece of code (just the top part not drawing) that I am having trouble with. The score seems to increase at random increments from 100 to 400. I can't see anything wrong with it. (Score is a number game attribute with initial value of 0.)
~Tony :)


  • Posts: 1938
The event is finicky. Use a collision event where it increases the score and kills itself from there.


  • *
  • Posts: 6108
Sounds like the event is fired more than once. You can use a boolean to make sure the code is executed only once:

<if <not Done>>
  <set Done to <true>>
  <set Score to <Score + 100>>