Strange bugs (with global variables) in an almost ready game

0 favourites
  • 10 posts
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • Hello everybody!

    I'm finally in the final stages of the development of my game, but unfortunately I'm running into some boring and unexpected bugs.

    My game is a similar mini-game collection like Wario Ware Inc. and the Dumb ways to die, where I developed each mini-game in separate CAPX projects. The basic mechanics consists of mini-games of different genres whose difficulty increases as the player progresses.

    Prior to integrate them into one project, each mini-game contained a variable "level" for test the increased difficulty, which consisted in increasing the speed of enemies, enemies emergence of intensity and others things. When they were in their own CAPX, every game worked perfectly on any difficulty level. In the integration of the project, I left alone a global variable "level", which increases as the global variable "victory" gained 3 points.

    It turns out that from the second level of difficulty or when a mini-game is revisited, some mini-games are presenting unexpected strange behaviors, related to own global variables.

    I created a "RestartVars" function for each mini-game, whose function is to restart the main own global variables and this function is called at the Start of the Layout, but I cannot understand why this isn't working in some games.

    Does anyone have an idea what might be going on?

    I thank once again the participation and collaboration of you!

  • add on top of your restartvars function a "wait 0 seconds" event.

    calling functions and setting variables on start of the layout needs this extra 0second wait event to load probaly

  • Your suggestion didn't work,

  • is it possible that you would share your capx or just make some screenshot of your event sheet with the parts that are important for this problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • EyeForcz After testing the game project in debug mode, I realized that the mini-games global variables aren't really being reset by the "ResetVar" of their respective Event Sheets.

    Where am I going wrong in these functions?

    Below two screenshots of one of the mini-games:

  • blackhornet, can you take a look in the two screenshots above of one of the mini-games?

  • Looks fine.

  • Are those two screenshots on the same layout?

  • Are those two screenshots on the same layout?

    Yes,

  • I apologize to the forum fellas by constant recurrences, but I'm doing this game alone and at the end of his development, I'm so exhausted and stressed I can not think clearly.

    The problem is even with the groups. The variables

    Of course, it would also be a problem with the variables, but I anticipated that. I didn't know that the states of the groups weren't restarted when we went out of the layouts. Living and learning with good teachers, sure.

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