Place non overlapping instances at lvl generation (Solved)

0 favourites
  • 6 posts
From the Asset Store
Forgotten Place - Melodic ambiance, background music, Synth
  • Hello all .

    I'm trying to generate a map with elements that should not overlap (for them to be separated). What I have here is alright most of the times, but I often get two overlapping outpost/nobuildzoneoutpost on my map.

    In my event system, the global variable "CreationStage" should go from "Outposts" to "Colonies" when all the outpost objects have their boolean "FixedPosition" at true. This boolean is fixed at true when the object "Nobuildzoneoutpost" (which is in the same container as the outpost object) isn't overlapping with another outpost's zone or the startpoint's zone.

    I don't get where my error is, could anyone point me in the right direction please ?

    Here's the .capx : https://drive.google.com/open?id=0BzvT54qnXvYcZE80YldvV3piQmM

    Here's the event sheet, I tried to keep it simple :

    Thanks a bunch .

  • Sorry for the bump, I can't manage to figure this out :/

  • Edit: was nonsense

    I changed a little bit in your order.

    And it seems to work.

  • Thanks for your input

    I just tried it but I still have overlapping instances at the end of the "Outposts" CreationStage's value.

    I may have done something wrong, here is my event sheet with your modifications :

    And the end result (1 out of 10 times approx) :

    I don't really get what I'm missing, sorry :/

  • I Edit my post. Please look again if this works better

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ohhhh that was because of a separate event... Thanks a lot, it works like a charm .

    You're my personal John Cena and doves will fly you to Valhalla.

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