1. Post #1
    Mchccjg12's Avatar
    April 2012
    30 Posts
    I'm trying to make an addon that will teleport to the player and kill them when not being looked at, but I also do not want it to travel though walls (so if it is locked in a room and cannot normally get to the player, it won't be able to teleport).

    If I can't do that for teleporting, then could I do that for normal movement (sliding, I guess)?

    (User was banned for this post ("Wrong section" - Gran PC))
    Reply With Quote Edit / Delete Windows Vista United States Show Events

  2. Post #2

    July 2010
    86 Posts
    I dont fully understand what you mean, but i think just you just need to use trace to see if the two players can see each other.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  3. Post #3
    Mchccjg12's Avatar
    April 2012
    30 Posts
    Sorry. I did word that a bit weird, didn't I? What I meant was, I want to code an object that will teleport to the player and kill them when they aren't looking in its direction. Is there a way to make it so that the object will not teleport to the player if it cannot reach them by normal means?
    Reply With Quote Edit / Delete Windows Vista United States Show Events

  4. Post #4

    July 2010
    86 Posts
    Then yeah, trace would be your best bet. Make it when the trace from the player to the object is broken the teleport happens. However for checking if its possible to get there via normal means then you would have to do some NPC pathfinding, ile try to find some wiki links later.

    Edit: Try this? http://bananatree.im/wiki/wiki.garry...finding_Module
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  5. Post #5
    Mchccjg12's Avatar
    April 2012
    30 Posts
    That might just work, now all I have to do is figure it out.
    Reply With Quote Edit / Delete Windows Vista United States Show Events

  6. Post #6
    Gold Member
    Kogitsune's Avatar
    September 2005
    2,748 Posts
    Could just make an snpc to do this, but then it would only work on noded maps.
    Reply With Quote Edit / Delete Windows 7 United States Show Events