Global Point system Help

0 favourites
  • 5 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hey guys i've been following this tutorials"

    Since i cant send links ill just write his name. ConstructDude and this is the tutorial name LevelSelect Tutorial In Construct 2 | Level Selection

    And theres something i want to do that they dont do in the videos. so i was wandering if anyone in here would know i have a star point system that shows how many stars i've gotten in that certain level.

    I want a system that counts all the stars i have not only for 1 level. but i dont want people to be able to lets say play the same level over and over again to get infinite stars.

    I want it so if i replay lvl 1 it deletes the ammount of stars i got previously in that level and replaces it with the new ammount of stars if its a higher number "Max is 3" i got.

    Can anyone help me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably need an array for that. 1 dimension should be enough.

    When the star progress is saved, instead of saving them to a global variable, save them to the array.

    Set Array at (level-1) = stars (with the condition that stars > array at (level-1))

    This way each level got his "stars obtained"-number saved in the array and it only increases if you obtain more stars in the level than last time. Make sure to set the width of the array to the number of levels you have.

    And to obtain the total stars obtained over all levels:

    -(some event that triggers the total stars counting)

    --subevent: set totalstars(globalvariable) to 0

    --another subevent: array->for each element (X) -> add to totalstars: array.curvalue

  • Hello can i get you to explain it with more detail?. im new to the program so i dont really understand this

  • s000.tinyupload.com/index.php

    maybe this helps

    array.at(x) will get you the amount of stars of lvl x+1.

  • Hello :), i cannot thank you enough for making that for me. it works now and im still so happy that you actually did this thank you so much

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