Hide and Seek

0 favourites
  • 7 posts
From the Asset Store
I-Spy (Hidden objects)
$34.30 USD
30% off
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hi everyone!

    I am fairly new to construct 3 but i am enjoying it a lot and I have actually managed to create (according to me;)) a couple of awesome things!

    I would like to try and create a Hide and Seek game for children (it's going to be a mini game inside a larger game).

    But the problem I have now is that I can't really figure out how I can make the same objects hide on different positions every round.

    For example: I have 5 objects I want to spawn between several different spawn points every round someone is playing. I was thinking about having around 20 spawn points and those 5 characters take turns hiding on all of these 20 spawn points.

    Is there anyone here that has developed something similar?

    And is there anyone here that has developed Children Apps before that has some cool projects to show? :)

    Have a fantastic day!

  • If you have 20 fixed spawnpoints, you could use (invisible) sprites. Place them as you like and then do:

    Pick random instance --> Create object at sprite.X, sprite.Y

    Then repeat as often as you need. You should make sure though that the same sprite cannot be picked again (e.g. you can destroy it after you spawned the hiding object.)

  • The random spawning worked great. However they still tend to spawn at the same Hiding spot from time to time. Attached you can see how I did. Do you perhaps have any suggestion on how I can solve that they spawn on the same spot?

    I didn't really understand how you meant to destroy the hiding spot when one object spawned on it :)

  • Don´t check for "on collision" as it won´t trigger like that. You can just put the "destroy" below the "create object"

    Also I recommend using a function for this. Functions are love!

  • Tenos

    I made a quick sample of how I would do it... put all the objects to find in a family to simplify the code.

    I made the spawn points big enough so that they can also be used when seeking. I have them at 20% opacity, but in the actual game you would want them to be invisible.

    each point has an instance variable to tell us if the location is occupied (which gets set when an object is put there.

    click the "Hide" button, and go find them!

    https://www.rieperts.com/games/forum/hidenseek.capx

  • Try Construct 3

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

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

    Thanks for the tip! Will try it out!

  • AllanR

    Wow! This was more or less exactly what I was looking for! You should have a great thank you for this, gives me a lot more understanding of how I should create my own work!

    I'm so thankful :)

    Have a great day!

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