Hey, so on my map I have an area for PaP but I want to have it so the door can't be bought, instead you shoot 3 objects and it opens. Could anyone tell me how or link me to a tutorial? I was looking for it to be so when you shoot it you would get an audio notification and maybe text on the screen. If anyone could help that would be great. I don't know if i'm just bad at searching but I can't find a tutorial xD
The code can be better but it works. You have to cover every object with a trigger_damage. And here's the code (you have to thread the first function before).
The code can be better but it works. You have to cover every object with a trigger_damage. And here's the code (you have to thread the first function before).
It's an interesting method, using trigger_off, I like it, except for the while loop.
Did you test it in a map with multiple doors and see if it still worked without more scripting? I ask cause you use "target" instead of "targetname", but that could be a typo. Then the targetname of the trig would be either zombie_door, which would break the script with more than one door in the map, or you made it a custom targetname, which would require more scripting to connectpaths on the door and move the door after trigger. You could set up the door to be the target of that trig you are using and add another function to complete this, imo.
If he just wants the door to move after shooting these, you won't need the trigger_off stuff of course, but will still need that other connectpaths, and door move code.
Last Edit: September 16, 2015, 03:48:09 pm by MakeCents
It's an interesting method, using trigger_off, I like it, except for the while loop.
I tried with flag_wait and with no loop but, I don't know why, the game stopped at this point for a few seconds. I'm just learning this kind of scripts and I don't know any way to stop the code until the variable has that value lol.
Did you test it in a map with multiple doors and see if it still worked without more scripting? I ask cause you use "target" instead of "targetname", but that could be a typo.
This code is similar to the one I used for my map, so it might work.
I tried with flag_wait and with no loop but, I don't know why, the game stopped at this point for a few seconds. I'm just learning this kind of scripts and I don't know any way to stop the code until the variable has that value lol. This code is similar to the one I used for my map, so it might work.
Cool. You don't actually have to stop the code. You can let it run. Remove the check from the fist function. Then in the function that increments the var, put the check there, after that. If they shoot them all, now do this...blah I subtract myself and use <= 0 instead, and I use an level array to store the size of each ee, but your way will work too if you pass the size into the function that you add the if check too.
Last Edit: September 16, 2015, 04:05:08 pm by MakeCents