Hello all, im trying to get my icon on the screen to reacted when player is near or within distance of a certain object.
Ex.
Player is near item, (lamp icon) glows.
There's a good chance you could use LineOfSight for something like this..
I'll see if I can prototype something with it and get back to you
Oh my gosh, thanks for that idea! I didn't even think of that. I tried to think of so many ways to code it when player is near. But im sure LOS can read it more efficiently then trying to hard code the distance of the item. thanks! I'll try it!
Okay, so I got the icon to react when player is near with LOS. But now, how do I turn it off if player isn't near or have LOS of object anymore?
You could probably set up some instance variables that change based on the line of sight. I didn't get to prototype it, so I have no idea. Let me know if the variable idea works!
Develop games in your browser. Powerful, performant & highly capable.
No problem! You don't have to create a prototype :) Your suggestions was enough to help solve something out at least. I will try creating an instance variable for it. Maybe something like this, LOS = 1 if Los = 2 Set animation "icon" (play from beginning). I think that would work. I will try it!