How do I generate a clean forest?

Get help using Construct 2

Post » Wed May 18, 2016 3:18 am

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 :
  1. Frst, if one tree is overlapping another, destroy it.
  2. 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? :cry:
B
3
Posts: 2
Reputation: 175

Post » Wed May 18, 2016 11:35 am

Daewa wrote: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.

Image
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Wed May 18, 2016 1:24 pm

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
B
33
S
8
G
3
Posts: 169
Reputation: 3,280

Post » Wed May 18, 2016 2:23 pm

B
22
S
4
G
3
Posts: 61
Reputation: 2,683

Post » Thu May 19, 2016 2:37 am

Asmodean wrote:
Daewa wrote: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.

Image


It's because I want Link to appear if front of the bottom of the tree, and behind the top.
Tuiii wrote: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"
B
3
Posts: 2
Reputation: 175


Return to How do I....?

Who is online

Users browsing this forum: Cha0tiXGamer, MaujDeveloper, Yahoo [Bot] and 7 guests