lukezero's Recent Forum Activity

  • Good morning,

    I didn't understand your suggestions, man.

    This problem is only happening when a mini game is revisited, and fortunately, only three of them.

    Now I'm testing to reset the boolean variables too and seems to be having some effect.

    I also realized that one or other strange behavior is situated in groups that are turned on and off through the mini-game. I'm looking for alternatives for that too.

    If anyone has suggestions, I will be eternally grateful. ^^

  • 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!

  • The "system compare" needs to be in the same block as the "while". It won't work if it's a sub event.

    It's alive, R0J0hound! Thanks dude!

  • I don't know if proceeded correctly, R0J0hound, but the CAPX with your instructions not worked. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Can you take a look at what's going on?

    http://s000.tinyupload.com/index.php?fi ... 1693725547

  • This could work also:

    var cur=0

    var last1=0

    var last2=0

    on click

    --- set last2 to last1

    --- set last1 to cur

    ------while

    ------ system compare: (cur=last1)|(cur=last2) = 1

    --------- set cur to choose(1,2,3,4,5,6)

    Thanks R0J0hound! I'll try it here! ^^

  • just a thought...

    Raffle!.capx

    Thanks for this functional example, korbaach!

    I was trying to do it without arrays (more 'cause I don't known yet to handle it), but I believe that this is only possible through the arrays, right?

  • I dont really understand what you mean......but hhis could help: https://www.scirra.com/tutorials/1267/r ... rpg-tricks

    Dont use the same purpose from this tutorial, just use the same technique.

    Hope that help!

    Thanks, I'm using the same principles, but my case is a bit more complex.

    To simplify my problem, I thought it best illustrate with numbers, because this is the basic principle adopted.

    In my case, the random generator always need to exclude the last two drawn numbers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi C2 community!

    I'm trying to make a random number generator only using global variables and simple commands, but I'm not able to get anywhere.

    The random generator draws 6 fixes numbers (1 to 6, like a dice), but always exclude the last two drawn numbers.

    To do this I'm using three variables: current (to storage the current drawn number), var1 and var2 (to storage the mini-game and avoid selecting the same number).

    There's the current CAPX with the generator test.

    http://s000.tinyupload.com/index.php?fi ... 0298583322

    If anyone has a suggestion to make it work properly, I would be very grateful. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    SOLVED!

    Below there is a CAPX example based on R0J0hound suggestion:

    http://s000.tinyupload.com/index.php?fi ... 9478675491

    There is also another example posted by korbaach, that uses array:

    https://app.box.com/s/t4gvdfwdhvp75uijslgkdyznqiex7qag

  • Sure, dude! The only online function of the game will be a ranking with the highest scores of the players. The game will initially be released only in the Google Play platform.

    Well, now I'm having trouble using global variables. All mini-games work well at first, but when revisited, are having problems. I created a function for each mini-game that resets the necessary global variables to their original values and these functions are called at the Start of Layout. However, apparently this isn't working.

  • Just an observation: I'm using global variables instead of tables and matrices to raffle the mini-games, as the random generation is temporary and disposable. That is, the only variable that should be stored in the game is the High Score, so I'm opting for Local Storage.

    What do you think? ^^

  • WOW! Thanks for your great explanation, !

    It isn't every day that you see so much attention and cooperation!

    Well, I certainly will use a database for storing local data, for my own game score and High Score. Your tips were of great value in this too.

    My current problem was more focused on the issue of global variables and how to restart them between one game and another, but that I believe could solve.

    I'm testing some stuff now and I'll give feedback through the day.

    Again, thank you for everything! ^^

  • ahr Ech, so the best solution is create a Function to reset each global variable to its original values in case of victory and loss conditions?

lukezero's avatar

lukezero

Member since 4 Oct, 2014

None one is following lukezero yet!

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies