Trigger or Code?
Post Reply
Quote
Re: Trigger or Code?
Posted by David from IKG on Tue Feb 15th at 1:24am 2005


Make it so that when a certain NPC gets killed, a hidden trap door opens. Also to make a button open a hidden trap door. Thanks.



Quote
Re: Trigger or Code?
Posted by French Toast on Tue Feb 15th at 1:46am 2005


Well, to make a button open a hidden trap door, just use the func_button stuff to open a section of wall textured the same as the rest of the wall.S:SCan't help with the NPC's though, I mostly do CS:S [addsig]



Quote
Re: Trigger or Code?
Posted by David from IKG on Tue Feb 15th at 1:49am 2005


awsome thanks . now i just need the npc death triggering the door answer...

edit: wait...for the button i can make the door look like the background with textures, but how can i make it so that if you walk up to it it wont open. i only want it to open when the button is hit....





Quote
Re: Trigger or Code?
Posted by French Toast on Tue Feb 15th at 2:07am 2005


If you go to the flags tab for the door, there will be a box for "Touch Opens" As long as that box is unchecked, and you should uncheck "Shoot Opens" too, but as long as those are unchecked, the door will not budge unless the button is hit.

[addsig]



Quote
Re: Trigger or Code?
Posted by David from IKG on Tue Feb 15th at 2:22am 2005


thanks sooo much

now can someone tell me how to make the trapdoor open once a certain npc dies?

thanks.





Quote
Re: Trigger or Code?
Posted by French Toast on Tue Feb 15th at 2:34am 2005


I'm sure if you fiddle around enough with the input/output tags then you could come up with something, unfortunately I don't know.

Here is my wild idea, but since I don't know how NPC's work it is probably totally wrong;

Name the NPC like NPC1, and then make it like open door when trigger_hurt I don't know it worked in my head. Never mind. [addsig]




Quote
Re: Trigger or Code?
Posted by Bobv on Tue Feb 15th at 2:55am 2005


i think it would look better if you had 2 door halfs on hinges that are contrained together for a trap door, then when you press button the constraint is broken - and the two doors swing down realistically utilizing that awesome physics engine that valve gave us, do what you want but i think this would look much cooler.




Quote
Re: Trigger or Code?
Posted by Rof on Tue Feb 15th at 3:19am 2005


Npcs have an "OnDeath" output that fires when they die. So for that NPC, add an output:

Output: OnDeath
Target: name of trapdoor
Input: Open

[addsig]





Post Reply