frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Check proximity

edited September 30 in How To
I want to have an enemy become more transparent the further it is to the player character, but I have no idea how to do that.

Comments

  • That's a very, very tough one. There's a way to do it, surely...
  • It's not exactly what you want, but it's the easiest way to get close. The hard way is difficult to explain.

    2017-10-01-00-44-58~2
  • edited October 1
    @Mhx Aîr

    It would take subtraction to see how far away it is from an object, division to get a percentage, then multiplication to get it to 1-100 so the alpha can work, but because there are no decimals on flowlab (for the most part) it couldn't work- so it's impossible.
  • edited October 3
    Wait.

    i think I got something but its only for x axis. I dont know how to do the radial distance.

    https://flowlab.io/game/view/727413

    edit: i think the function block is broken. its supposed to be on abs value and not sine
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch