what should i use, change or constrain attribute?

guillefaceguilleface Member Posts: 1,014
edited November -1 in Working with GS (Mac)
i set hero game.health.attribute=10
so on a heart image i set to replicate x game.health.att so this makes the heart to appear 10 times, so i have a rule when hero collides with enemy to change health.att to health-1
so i should get 1 heart less, but sometimes i get 2 less, so in this case how i should add the rule
to change attribute health-1
or constrain attribute health-1?

Comments

  • davidsalomondavidsalomon Member Posts: 136
    I believe it's change attribute health-1, that's what I would use, but I'm new to GS anyways.
    Let's see what the Chefs say.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you want to change the attribute to -1

    Maybe your colliding with 2 enemies at once or something causing it to subtract twice
  • guillefaceguilleface Member Posts: 1,014
    i think the problem was the bullets were spawning in a different layer so the weren't visible i think so they were colliding with the hero. i think lol but thank you guys
Sign In or Register to comment.