How do I multiply global variables?

  • I have made a platformer game using construct2 and I have 2 layouts. One for each level.Each time a person fails to finish there level the game adds 1 to the number of tries(global variable).i have 2 global variables one of each layout. How do I add the 2 global variables as I want to show the user the timber of tries it took to finish the complete game.but I can’t do this as I don’t know how to add two global variables. Please help me!

  • * moved from Construct Classic section.

    Please be aware which section of the forum you are in before making a post.

    Thanks

  • Create a third variable wich is equal to the two other variabled added, and that's what you show the player.

  • * moved from Construct Classic section.

    Please be aware which section of the forum you are in before making a post.

    Thanks

    im new to forums i dont know how

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a third variable wich is equal to the two other variabled added, and that's what you show the player.

    but these global variable values could change so how do i make a global variable which is equal to the other two variables added up?

  • Every time a player fails the level you add 1 to the number of tries on that level, right below it on the same event, do a global variable 3 = global variable 1 + global variable 2.

  • Every time a player fails the level you add 1 to the number of tries on that level, right below it on the same event, do a global variable 3 = global variable 1 + global variable 2.

    i got help from the construct2 discord server but thanks anyway!

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