Kill Counter

This forum is currently in read-only mode.
From the Asset Store
Make a displayed number gradually increase or decrease, making an impression of a real-time counting.
  • I can`t get my kill counter to work tryed everything. I`ve made a new private variable called Score and then got always - Text: Set Text to ""Score: " & round(Character('score')) in events. Why don`t it work i`ve followed the tutorial from ghost shooter. I used to be able to get it to work but never been on consturct in ages so got it today and can`t manage to make it work anymore.

    Thanks in advance.

  • Try making it always set text ="Score :" +(str(PlayerSprite.value('Killcount")))

  • Still don`t work. i will upload cap.

    Download: http://files.filefront.com/Top+Down+Gun ... einfo.html

    See if you can find what the problem is.

    Thanks for fast replay.

  • You need to change it so that in event 3 when it destroys the AI it adds one to his score and it will work fine.

    so

    • Bullet overlaps AI

    + destroy AI

    +Add one to player PV score

  • Try making it always set text ="Score :" +(str(PlayerSprite.value('Killcount")))

    That'd work to display the string, but is identical to the & syntax used in the original post. As Aeal said, with just the events you described you're showing a private variable that never changes, so you need to add 1 when you kill something

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Feel like such a noob i can programme in basic aswell so this should be easy to me lol. I have already added it though on event 3: Text Add 1 to "Score" and then got it displaying variable.

    Pic:

    Can you try explain more i`m such a noob lol.

  • Text: Add 1 to score

    then later...

    Character.Value('score')

    You're adding to a 'Score' variable in the text object, but displaying the 'Character' score. Which one are you gonna use?

  • Before

    <img src="http://i36.tinypic.com/116i5u1.jpg">

    After

    <img src="http://i35.tinypic.com/ifvomr.jpg">

    The only thing I changed was the private variable in line 3. It adds to the Characters PV score and it will always display the current score in the text box. I hope this helps if not let me know if i can help any other way.

  • Thankyou so much for all your help and really quick replys.

    I managed to get it to work with your help from both of you.

    I can get on and do something else now make it more polished :p.

  • I did this by adding a text file value.

    First took the text and add a private variable to it.

    then with the running time set text to 'variablename'

    Example:

    Event: Value 'hit count' equal to 5

    Actions: Monster:Destroy

    Text: Add 10 to 'score'

    Text: Set text to 'score'

    score means private variable in monster.

    Thnkss and Good Luck

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