0 Favourites

Score Keeps Going and Going and...

This forum is currently in read-only mode.
  • + System: Is global variable 'Boss002' Less or equal 0

    -> Boss002: Destroy

    -> System: Add 500 to global variable 'Score'

    -> System: Set global variable 'Mode' to 99

    For some reason, once the first boss is killed, the score keeps climbing. Never stops. Killing the enemy ships is working fine. For example:

    + Enemy003: Value 'HitCounter' Greater or equal 1

    -> Enemy003: Destroy

    -> System: Add 300 to global variable 'Score'

    The GLOBAL "score" is set up as:

    + System: Always (every tick)

    -> Text_HealthIndicator: Set text to "Health: " & Hero ('Health')

    -> Text_ScoreIndicator: Set text to "Score: " & global('Score')

    -> Text_BooksIndicator: Set text to "Books: " & global('BookCount')

    Once score hits 500 or more, that first boss comes. Once the ship is destroyed, the score continues on without stop.

    Any thoughts on this? Need to see the CAP?

    Thank you.

  • Try 'trigger once'?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • If the events posted above are complete, then there's an event/condition/trigger missing, that sets the global 'Boss002' to anything other than less or equal 0. Which means, as soon as that condition is met, it keeps being true on every tick.

    One solution could be indeed using 'trigger once' with this event:

    + System: Is global variable 'Boss002' Less or equal 0

  • Sorry, meant Boss001, not 002:

    + System: Is global variable 'Boss001' Less or equal 0 (Boss' HEALTH)

    -> Boss001: Destroy

    -> System: Set global variable 'Mode' to 99

    -> System: Add 500 to global variable 'Score'

    I moved the score action to my trigger event for the sound:

    + System: Trigger once

    -> XAudio2: Autoplay resource "bigboom.wav" (No loop)

    -> System: Add 500 to global variable 'Score'

    Yes, that worked and the score not going on forever (assuming it does, I stopped it at 20,000,000 last time).

    I must have done something, when fixing the global variables the other week, that caused the boss scores to not end.

    It is working for now and see how it goes.

    Thank you both very, very much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Go Go Monkey Squad on INDIEGOGO
35 2,915
Rory's avatar
Rory
Unread hot topic
0 Favourites
Keep me logged in.
66 5,736
grigrizljac's avatar
grigrizljac
Unread hot topic
52 24,762
damainman's avatar
damainman