How do I - make random object to appear automatically ?

0 favourites
  • 4 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Does anyone can help me to make random object to appear/show up automatically ?

    so here we go, the game is about restaurant.

    this is how it works:

    people coming in automatically as layout started, then when people stops, the order pop up automatically above the head and the order that pop up is random.

    the bold line is the problem because I already tried many ways to make it works but nothing happened.

    I have also been tried to search it first through forum to find if there is any topic that could solve my problem but I found none.

    I don't post any example capx because that's the only problem that i can't solved yet, so I guess no use to post one.

    Please some advice from anyone in the forum

  • Hey Dark,

    Start with a global variable called 'CustomerCount'.

    All of your customers that come in should have a variable called 'Number' and another called 'Seated'.

    When a customer is spawned you attach a the Customer Count number to it and add 1 to the variable (so each customer has a unique number).

    When that customer sits down make the 'Seated' Variable 'Yes' or '1' to mark him/her as ready to order.

    Choose your way of using a timer, timer behaviour, dt, every X seconds etc and then pick a random customer like this (these are the conditions).

    Pick all Customer object (pick all is from the system menu)

    Customer object is seated (Click on the object and then compare the variable)

    Pick a random Customer object (pick random again from the system menu)

    (The above picks all the customers, then refines the search to only customers that are seated and then picks a random one of those to call for the order).

    The add the action to the conditions:

    Customer spawn object (Order bubble) at image point over the head.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Dark,

    Start with a global variable called 'CustomerCount'.

    All of your customers that come in should have a variable called 'Number' and another called 'Seated'.

    When a customer is spawned you attach a the Customer Count number to it and add 1 to the variable (so each customer has a unique number).

    When that customer sits down make the 'Seated' Variable 'Yes' or '1' to mark him/her as ready to order.

    Choose your way of using a timer, timer behaviour, dt, every X seconds etc and then pick a random customer like this (these are the conditions).

    Pick all Customer object (pick all is from the system menu)

    Customer object is seated (Click on the object and then compare the variable)

    Pick a random Customer object (pick random again from the system menu)

    (The above picks all the customers, then refines the search to only customers that are seated and then picks a random one of those to call for the order).

    The add the action to the conditions:

    Customer spawn object (Order bubble) at image point over the head.

    ok GenkiGenga, will do it first then I'll post again if it works or not and thank you for your advice

  • Alright, problem is solved.

    To GenkiGenga, THANK YOU VERY MUCH, actually it's already done yesterday but I just got time to post in the forum.

    So, I guess this topic should be closed by now.

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