Forums are in read-only mode. Data has been backed up but be sure to save anything you want.

TraceLine help



  • So it appears that I can’t figure out how to add a extra entity to TraceLine in the hammer class

    What I’m trying to do is make the TraceLine ignore all prop_ragdolls but so far if I add prop_ragdoll into it then the hammer will no longer function and it’s incredibly confusing

    Here is my code

    local tr = owner:TraceLine(64, MASK_SOLID, {owner:GetMeleeFilter(), ents.FindByClass("prop_ragdoll")})
    


  • So it appears that I can’t figure out how to add a extra entity to TraceLine in the hammer class

    What I’m trying to do is make the TraceLine ignore all prop_ragdolls but so far if I add prop_ragdoll into it then the hammer will no longer function and it’s incredibly confusing

    Here is my code

    local tr = owner:TraceLine(64, MASK_SOLID, {owner:GetMeleeFilter(), ents.FindByClass("prop_ragdoll")})
    


  • 1. prop_ragdolls are removed when the game starts so why do you need this?
    2. you’re making two subtables inside a main table, not one big table.
    {owner:GetMeleeFilter(), ents.FindByClass(“prop_ragdoll”)}
    should be
    local filter = owner:GetMeleeFilter()
    filter = table.Add(filter, ents.FindByClass(“prop_ragdoll”))


 

1
Online

11.3k
Users

15.5k
Topics

300.3k
Posts