Pass Value betwen...

  • Hi, Im really amazed with this software, its just GREAT. Im currenly trying to develop a series of games in my country and i have a little problem.

    I created a global variable ( life ) and when it passes to another Layout the variable goes to its initial value.

    The main character passed with 2 of remaining live, but it passed so i call a GO TO + new level and opps the initial value of the global hit me on the face.

    Im quite sure im doing something wrong, sorry about my bad english

    Hope some one helps!

  • Global variables shouldn't reset like this. Are you sure you're never resetting global variables?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • when i call the new layout with the GO TO, the variables restart, i guess be cause i have a INCLUDE SHEET command reffering to the place the variable its created.

    I tryed to move globals to a new Start sheet, but when i try to move from the original place the code start yelling errors

    Is there a way to pass a value to the global while changing to another sheet?

  • SOLVED!

    It was my fault, i was using a include sheet command, so in the included i had the Globals restarting, so i was forced to create a new global called, removelive so when player gets hit its increase one, and in the next sheet at the begin of the sheet it sustract from main global its gets from the include sheet!

    Little trick did the job

    :)

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