Terrible Tree Trouble

Get help using Construct 2

Post » Thu Jun 06, 2013 3:24 am

mmm I usually just Force a 'For each "tree condition on stuff like that and it works fine for me...have you tried that?

Try putting the trees in a Family then add an extra condition "For Each->(TreeFamily)....
that usually works for me....
Its not usually necessary but sometimes FORCING the condition works more consistantly
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Thu Jun 06, 2013 3:31 am

I'll try forcing it and see if it works. Hopefully the conditions don't press charges.
B
6
S
1
Posts: 62
Reputation: 532

Post » Thu Jun 06, 2013 3:36 am

A-HA! I fixed it by slightly modifying the last .ZIP blackhornet sent.

Player is not overlapping tree
   Trigger once while true > Tree opacity 100%
B
6
S
1
Posts: 62
Reputation: 532

Post » Thu Jun 06, 2013 3:41 am

This is what the functionality looks like for anyone in the future who stumbles across a similar problem. Thanks for all the help guys!

Wigriff2013-06-06 03:41:50
B
6
S
1
Posts: 62
Reputation: 532

Post » Thu Jun 06, 2013 6:14 am

I believe this would work as well:

Every tick: Set tree opacity to 100
Player is overlapping a tree: Set opacity to 25

No need to hassle with uids or loops :-)
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Thu Jun 06, 2013 1:54 pm

That doesn't work for the same reason that my original couple of simple ideas didn't work: there might be 30 trees on the map, but there is really only 1 "tree." You have to use the UIDs to distinguish between different instances of trees in order to individualize each tree, or else the opacity will be set to 75% for each consecutive tree you walk into without it reverting to 100% until you aren't touching ANY trees.

You just end up with half of the trees being transparent that way. :)
B
6
S
1
Posts: 62
Reputation: 532

Post » Thu Jun 06, 2013 1:56 pm

[QUOTE=Wigriff] That doesn't work for the same reason that my original couple of simple ideas didn't work: there might be 30 trees on the map, but there is really only 1 "tree." You have to use the UIDs to distinguish between different instances of trees in order to individualize each tree, or else the opacity will be set to 75% for each consecutive tree you walk into without it reverting to 100% until you aren't touching ANY trees.

You just end up with half of the trees being transparent that way. :) [/QUOTE]

Actually it should work, as each tick it sets every trees opacity to 100. After that it checks if player is overlapping any trees, and lowers their opacity. Don't see why it would not work :)
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Thu Jun 06, 2013 2:01 pm

Here, even made example for your viewing pleasure :)

Tree example
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Thu Jun 06, 2013 2:27 pm

Well I'll be damned... I don't know why that didn't work for me. I'm almost positive I tried that and variations of that at some point. Maybe something else in my event chain was interfering with it since my event chain is more complex. Hmmm...

Well, the moral of this story is to definitely use Vee's simpler, more concise example if it works, and if not use the complex, convoluted example I previously posted. ;) lol
B
6
S
1
Posts: 62
Reputation: 532

Previous

Return to How do I....?

Who is online

Users browsing this forum: evillair, Solomon, vankizzle and 8 guests