Overlap check after spawn in "On start of layout"

0 favourites
  • 7 posts
From the Asset Store
Pathfinding AI
$2 USD
80% off
Units do not overlap each other and use different ways if there are several free ways.
  • I'm trying to make isometric field, but I don't want to make all fields with copy & paste, and I decided to replace with tiled background.

    I made logic like this.

    <at start of layout>

    1) create "checker" object all around, in isometric fit position.

    2) after that, check overlapping "checker" with tiled-background-objects for replacing. If there are, replace it.

    <at start of layout>

    3) place them in appropriate z-order.

    and THIS DID NOT WORKed. And I guessed maybe overlap information updates after a tick.

    And modified overlap checking codes to outside of <start of layout>, it worked. BUT, I don't want pass 1 tick... because It is field (background or like thing) , and If there are any lag Player may see them. :(

    And... I think there might simple ways, and... It, I'm meaning this situation, is not intuitive, as I think.

    <img src="http://img90.imageshack.us/img90/1278/20130308231028construct.png" border="0">

    thus, How can I check overlap properly right after spawning some objects? or Is it an engine-problem? (right now, I don't know so much about programming, and I don't know that.)

    Sorry for inconvenience!

    1) The .capx file without clay.io plugin

    2) .capx file reproducing Type-B problem

    and last, If there are any rude words and sentences, sorry for that. I'm not good at english.

  • This includes one solution:

    Forest generation

    Not sure if it applies 100% in your case, but might give you an idea :)

  • What's wrong with "Type B" with the subevent? Is that not working correctly?

  • ramones

    er... It worked not properly yesterday... (the time of here is morning now. 8:15 am :D ) er... I'll check it in another pc.

    WHYYYY?!!!!!!?!!? Are events have context on editing?! Or, Is it just my confusion?! Am I not remembering correct?!

    all

    after all, I solved problem in onother way, with using additional 2 ticks, via wait 0 action. But I don't want things done in that way.

    vee41

    Thank you for example, and from that, I learned the "choose" expression. and tried in your way by comparing count of created things, but It was not intuitive, and also uses 1 tick for that, as I think.

  • check this file, see the "platform" event sheet for reproduce problem.

    http://www.mediafire.com/?47auu9el4z8kcd7

    events are same as below.

    <img src="http://img688.imageshack.us/img688/9982/20130309082812construct.png" border="0">

    result might like this.

    http://img541.imageshack.us/img541/2259/20130309082443magimaric.png

  • Your 'Destroy on startup' event sheet is destroying the grass and sand after it's created.

  • Try Construct 3

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

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

    ergggggg... simple mistake! thank you ?.? I'll do more care next time before asking!

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