How do I generate a clean forest?

0 favourites
  • 5 posts
From the Asset Store
Add fantasy, atmosphere and an exploration vibe to your games with these 6 forest themes
  • Hello there,

    I'm sure there's already an answer somewhere, but I really struggled and failed to find a solution.

    Here's my live project

    And my capx

    (Disregard my global variable, it's just a remain of some attempts)

    I wanna try two methods :

    • Frst, if one tree is overlapping another, destroy it.
    • Second, I tried to set "tree_bot" & "tree_top" Z-Order depending on their Y position, from top to bottom, so that higher trees are hidden by lower ones.

    My main issue is that I have no clue how to pick an object just created and compare it with the other ones. May I have some help please?

  • Second, I tried to set "tree_bot" & "tree_top" Z-Order depending on their Y position, from top to bottom, so that higher trees are hidden by lower ones.

    I don't see a reason to split the tree in two objects. Can you not achieve what you want, with complete trees?

    In this example that are two complete trees, where the tree behind is partly hidden.

  • I think you don't have access to a previously created object except by pick by uid until the next tick.

    I am not sure that is the problem, but I suspect it.

    yours

    winkr7

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • does this suits your needs?

    https://dl.dropboxusercontent.com/u/231 ... forum.capx

  • >

    > Second, I tried to set "tree_bot" & "tree_top" Z-Order depending on their Y position, from top to bottom, so that higher trees are hidden by lower ones.

    >

    >

    I don't see a reason to split the tree in two objects. Can you not achieve what you want, with complete trees?

    In this example that are two complete trees, where the tree behind is partly hidden.

    It's because I want Link to appear if front of the bottom of the tree, and behind the top.

    does this suits your needs?

    <a href="https://dl.dropboxusercontent.com/u/23138239/link_daewa_scirraforum.capx" target="_blank" rel="noreferrer" style="cursor:help;display:inline !important;">https://dl.dropboxusercontent.com/u/23138239/link_daewa_scirraforum.capx</a>

    Thank you, thought I wanted to avoid using arrays cause I didn't want the tree on a grid (so trees can appear like the image above, I know it doesn't make sense with me wanting to avoid overlapping but I wanted to try anyway), but I guess I can make it appear less "griddy"

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