• NPC and SENT relationships
    1 replies, posted
I'm sure this is pretty basic, but I can't find it. How do you make all NPCs hate and attack your SENT?
[QUOTE=Bubbadaboo;24817520]I'm sure this is pretty basic, but I can't find it. How do you make all NPCs hate and attack your SENT?[/QUOTE][LUA]function ENT:Think() for _, npc in pairs(ents.GetAll()) do if npc:IsNPC() then npc:AddEntityRelationship(self, 1) end end end[/LUA]But it wont work unless its an npc type of a sent. Or you could also create another entity (like [I]npc_bullseye[/I]) in the position of the entity you want npc's to attack and set the entity's ([I]npc_bullseye'[/I]s) relation ship to hate with all the entitys on the map.
Sorry, you need to Log In to post a reply to this thread.