Seeing Through Tree Cover

This forum is currently in read-only mode.
From the Asset Store
Project File of my C3 Tutorial Random Tree Generator
  • Hey guys!

    Pixel, you're right about the "always" event. I've been using FORs inside functions for a while so I kinda forgot about it


    Glad you are mixing solutions to come up with what you want!

    As for the math, let me try to explain to you:

    distance() is a nice system expression the devs created to help us find the distance between objects without having to make a math mess on your event sheet.

    clamp() is another expression which gives limits to your output number - in this case, between 0 and 100.

    So the event is:

    If the distance between Player and Tree is below 200 pixels, run this:

    - Set the tree's opacity - with a limit between 0 and 100 - to the value of the distance.

    I've multiplied it with 0.7 to make the value more intense - if the tree's distance is 150 pixels, the tree will get 100 opacity clamped from 150), so you wouldn't see a thing.

    Do you get it? I don't know if I'm being very clear as I am also not a developer


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you get it? I don't know if I'm being very clear as I am also not a developer

    Fantastic explanation, thanks!

    I've tweaked the multiplication factor to 0.2 for the larger trees, and I've set the lowest opacity value to 20 so that the player will still have an idea of where the tree is without having his view obscured. You and Pixel have been great tutors!

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