How do I solve this...

0 favourites
  • 6 posts
  • Now for some odd reason, when i go from the main menu into the random gen map, it doesnt want to work.

    Normally when i run the layout it does work, but the second i come from another layout it bugs out.

    I've busted my head for hours to no avail, im definitely missing something because ive done it before, and it worked.

    Please take a look at the source code, the rand gen procedure isnt what ive come up with but it works.

    Note: please try to let me know via screenshot/telling me the error instead of actually updating the capx as my team and i haven't updated yet.

    Thanks alot.

    .CAPX Here: goo.gl/UjSY3y

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's because the randomgen relies on tickcount, which is the number of ticks since the game started. It's only going to work in its current state if its the first thing to load in the game. You'll need to change the tickcount checks under randomgen and add in your own counter I guess.

  • It's because the randomgen relies on tickcount, which is the number of ticks since the game started. It's only going to work in its current state if its the first thing to load in the game. You'll need to change the tickcount checks under randomgen and add in your own counter I guess.

    Well that was probably really obvious lol. Thanks alot! I guess since i was staring at it for so long, it didnt occur to me, thanks a ton thou!

  • It's because the randomgen relies on tickcount, which is the number of ticks since the game started. It's only going to work in its current state if its the first thing to load in the game. You'll need to change the tickcount checks under randomgen and add in your own counter I guess.

    Okay, so ive tried variables, using 1 second breaks and incrementing, but i cannot get it to work for the life of me...Does anybody have any other ideas?

  • Not 1 second breaks, every tick. Set a global variable on RandGen to 0. Add an event every tick add 1 to global variable. Replace all of the tickcount checks with global variable.

  • Not 1 second breaks, every tick. Set a global variable on RandGen to 0. Add an event every tick add 1 to global variable. Replace all of the tickcount checks with global variable.

    It worked

    Dont know why i thought the 1 second break would work, probably because it would be longer, not sure really. But you where right.

    Thanks again

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