Simple "line of sight" script?

● ARCHIVED · READ-ONLY
Started by megamageiii 5 posts View original ↗
  1. I have been making a game that needs a very basic stealth system. What I need is that if you are within a triangle/cone (whatever you want to call it) in front of them, a script will run, unless there is a non-passable tile between them and the player. I would also be OK with it using region ID or terrain tags. I have been looking for a long time, but all I could find were ones where they could see through walls, or it was too complicated, with things like distraction, camouflaged armor, noise, etc. After hours of Google and even trying to combine parts of scripts into one "patchwork script" (which didn't work, obviously), I still haven't found any.

    I did manage to find some graphics that explains what I need pretty well, though:

    post-29569-0-99564700-1393184535.jpg                post-29569-0-86368400-1393184529.jpg

    Runs a script.                                  Does nothing.

    Does anyone know if a script like this exists?
  2. there are a few scripts, but they all have limitations - because "line of sight" is NOT simple, it's one of the more complex problems around (not top-level complex, but far from your "simple").


    you should find one if you use the forum search engine - google is a very bad choice for searching specifics to small communities, especially if the words are used in a lot of other areas as well. For such searches, it's a lot better to search only on the specific forums or on the master script list.
  3. I've been looking for a line of sight script myself.


    Preferably in real-time as well, with potentially dozens of events performing the checks every few frames.
  4. Vlue's Proximity Detection script works for this pretty well.


    Try that one.


    It got a simple one line direction based line of sight detection and a triangle based line of sight detection.


    Events will not see through impassable tiles unless you mark them with a region defined in the script.