Stencyl 3.4.0 is now out. Get it now!

how to fix this?

Sparf

  • Posts: 33
Hey, I  am trying to create a scoring system for when a specific actor collides with another specific actor it disappears and increases the score by 1.
But instead of it increasing by 1 it increases it by 35, I have no idea why it is doing this please help.

Bombini

  • Posts: 830
Hi,
use a boolean (if hit false) and set it to true when it collided (added the 1).
Cheers!

LenseOnLife

  • *
  • Posts: 120
Hi Sparf,

It is also a mystery to me - but maybe if you could sent some more info on the code blocks and events that you are using we could all get rid of the mystery  ;D

You could take screen shots of code and include them as attachments - that could be the simplest way or even export your game and attach it.

Cheers,

Oliver

Bombini

  • Posts: 830
This is very simple as i said (see attached)

NickamonPoppytail

  • *
  • Posts: 325
This used to happen to me a lot, just have a Boolean attribute/game attribute that is set to false, then when a collision occurs, use this code:

When Actor 1 hits Actor 2
  If Boolean = true
     Set Score to Score + 1
     Set Boolean to false
  Set Boolean to true

NickamonPoppytail

  • *
  • Posts: 325
Or

If Actor 2 hits Actor 1
    Set Score to Score + 1
    Kill Self

If you want to destroy the actor afterwards. This should work better than the other code I posted.