Random generation issue

0 favourites
  • 3 posts
From the Asset Store
Template for dungeon/maze generation, using wave function collapse
  • Hi

    I am generating some objects randomly and its working good but if its getting delayed in starting the layout means from start screen if you delay in pressing "start" button all the object are getting loaded and all the objects coming at a time as a group.

    I have tried fixing this by grouping the events and deactivating this group on start of layout and activating on space bar is pressed but this didnt worked.How to fix this.Please help me.

    Thanks in advance

  • Try Construct 3

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

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

    I am generating some objects randomly and its working good but if its getting delayed in starting the layout means from start screen if you delay in pressing "start" button all the object are getting loaded and all the objects coming at a time as a group.

    I have tried fixing this by grouping the events and deactivating this group on start of layout and activating on space bar is pressed but this didnt worked.How to fix this.Please help me.

    Thanks in advance

    I've a few questions for you that will help us get to the solution:

    1) Are you generating the same object type or different object types?

    2) How many objects are you trying to create?

    3) Do you want the objects to spawn at the same time or one at a time with a delay in between?

    4) Do you want to wait to spawn the objects until after the start button has been pressed?

  • I believe what you are saying is.. If the player delays at the start screen all the elements are already running once the game starts visually.

    This is a common issue and one I had to solve myself in my space shooter. It is not an easy thing to fix ironically. Common sense would say "start of level" means when the player can see it.. this is not true however with C2. You will have to take all of your elements that need to wait until the player is actually "in" the game and tell them when to start separately of on start event. The easiest way to do this is with a trigger. I put a start button on my intro/instruction screen. The start button being pressed changes a "Started" variable from 0 to 1 and my on start of layout conditions out Started=1. This way the layout junk won't load till the player actually starts the game. I then moved the order of the on start actions or put some after a wait=1 action to make sure the player had time to get in visually and not notice any behind the curtain shenanigans.

    In clicker wizard I simply put a "click or touch to start game" flashing text on splash screen. This text event carries the same trigger type var and will let level load only after player clicks/touches screen.

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