Different event happen on start of each new layout

0 favourites
  • 5 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Hi dudes! I have several levels, each is a different layout. When I start each level I want something new to happen, but it's different each time. Obviously I want to use the "on start of layout" condition, but need to determine which layout it is. How would it be best to do this?

    What I currently do is have one master event sheet, which is inherited by each layout. Each layout then has 1 event which sets a global "levelNum" to the correct level number. Then in the "on start of layout" I check the value of levelNum.

    Is this the best way to do this, or is there a better way?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use an Array to store the different actions you want to happen, and on start of layout randomnly select one, or put "Wait N seconds" and call more than one.

    Also, you can put them as Groups (Unactive on Start), and activate them as needed.

    Or, using a local variable, select a value floor(random(0 to N)) with N as many events as you have, and compare the local variable and activate the one which equals the value created.

  • Couldn't you just use the LayoutName expression with a system compare?

  • I wonder if anyone is in the making of a on start layout ( number ) WOuld be helpful in level selector SO that you can only use one Master sheet

  • R0J0hound I didn't know there was a LayoutName expression, how do you compare against it?

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