How do I fix error about comparison

  • hi i have a problem about the comparison,

    when I touch the enemy, and I chose number greater than the enemy's numbers. enemy destroyed. the problem comes when the enemy a lot.

    seems to me difficult to explain, then below ther project files

    ps: sorry for my english.. i use google translate

  • Give this a try

  • emoaeden : thank you for your help

    I've tried the file you attach. there is a little problem,, I add conditions Enemy.Count <= 11, I mean that the enemy is out to 12 enemies. the problem is when the enemy is destroyed, the enemy count it again from the beginning. how to keep the enemies that appear to 12 and when the enemy destroyed the count not back to the beginning.

    *sorry if my english bad.

  • Can you link a file ?

  • emoaeden thanks, but it's solved..

    I add global variable for enemy,,,and group enemy spawn,, then check for enemyCount == 0, set group to deactived.

    that's it.

    thank you very much once again

  • emoaeden sorry I asked again.

    I tried to make it again from scratch. follow the file you attach. with little change. but there is an error, when the sprite object is destroyed, the text object is not destroyed.

    and also does not appear the word "success" which I have made.

    here I attach the file.

    please help. thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • First off, apologies for not answering sooner, but my internet has been down :'(

    I can fix this whole problem for you and it would also minimise your script, by using containers. Now if you want to have a play with them, and do it yourself, be my guest (as they are a super handy thing to learn and understand) if you just want it to work, message back and I'll just do it for you.

  • emoaeden thank you for replying.

    I can not send private messages, because the problem of reputation.

    I'd love to learn how to make games with construct 2, but with the urgent task, I want to make them quickly. I think I will learn with the help of you. thank you for helping.

    p.s: sorry about my english

  • All fixed ^_^

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)