How to make NPC's shoot?
So, npc's i put sctually are trying to shoot me, but no bullets fly.
I tried sk_npc_dmg command, but it doesn't seem to work...
So is it possible at all?
Also one thing i can't figure out. When you put smth on a button, and it's triggered and goes down, than you stand at it together with physic object, and then you get off, the button untriggers. Any possible way to avoid this besides unchecking "clients"?
thx.
Madman wrote:
I already tried to find this out, unsuccessfuly.
So, npc's i put sctually are trying to shoot me, but no bullets fly.
I tried sk_npc_dmg command, but it doesn't seem to work...
So is it possible at all?Also one thing i can't figure out. When you put smth on a button, and it's triggered and goes down, than you stand at it together with physic object, and then you get off, the button untriggers. Any possible way to avoid this besides unchecking "clients"?
thx.
Regular turrets should be an entity "npc_portal_floor_turret"
Rocket turrets should be an entity "npc_portal_rocket_turret"
To make a button function properly, you need a small trigger in the middle for physics objects (normally filtering out anything that doesn't have the name "box"), and you need a bigger trigger that covers the whole button for clients only. You set each one to put the button down and disable theother onstarttouch, and enable the other and move the button up onendtouchall.
By the way, if what you are doing is making one trigger for both clients and physics objects, keep in mind that the client sets off a trigger if they are directly above it, while a physics object sets off a trigger if they are touching it at all. If you are using only one trigger, you'll find that activating it with client is too sensitive (aka you have to stand in the exact middle of the button) or activating it with the physics object is not sensitive enough (aka your box could be completely resting on the button's frame and still have the button depressed).
[url]See tutorial here[/url]
Quote:
Regular turrets should be an entity "npc_portal_floor_turret"
Rocket turrets should be an entity "npc_portal_rocket_turret"
And Combine soldiers should be...
As for the two triggers, onendtouchall command releases the button only if EVERYTHING gets off it, be it clients or objects, right?
"OnEndTouchAll" makes sure that there are no entities that trigger it within the trigger volume before firing the commands you have set. For instance, if you put two buttons so that they are both activating the box trigger, if you remove one box, "OnEndTouch" would deactivate your button while "OnEndTouchAll" would not. Not sure how this applies to clients, though, but this is how Valve does it, so this is how I do it.
And concerning NPC's, they Do hate me, and do shoot me. There are gunflashes, but no bullets and bullet sounds. Though if you come close, meelee attack works. That's just above my understanding.