Forcing a turret to shot for 1-2 second
Quote from DaMaGepy on July 9, 2012, 1:13 pmAhoY!
I have a question. The situation:
There is a turret (in a mine) blocked behind some crossed wooden plank. I want it to shoot at me when he sees me, therefore first destroying the planks. Then the player can pick it up easily and place it anywhere it needed (and can call for a new turret fizzling the old one, with a button). Its for a later puzzle, where the player uses the turret to destroy similar obstacles (wooden planks) to clear the way for a funnel in a tunnel.
There are 2 problems:
1. it only shots if it sees me (so there must be holes in the plank barricade)
2. but if it see me, half of the bullets hit me too. I dont want the player to get hurt intentionally.So I tought maybe I can make a button that forces the turret to shot ahead for 1-2 second. But how?
In citizen mode (inactive/not shooting by default) the only think I found is the FireBullet input, but thats broen I think. It makes to shot 0.3 second 1-2 bullet randomly (just like when I flip it over). Even if I place an info_target or any other target, and I tell it to firebullet at that, it shots randomly.So is there a way without scripts to force it to shoot straigth ahead for 1-2 second, then stop? What kind of target it needs? or if it needs a script, how I set it up? I never did scripts and dont even know how to use one or what to edit.
If all fails, I can put an extra glass more ahead of the turret, so it still sees me but while or after the planks got destroyed, the player still unhurt. Knowing the mapname where valve made a turret to shot also can help, cant remember where it was.
AhoY!
I have a question. The situation:
There is a turret (in a mine) blocked behind some crossed wooden plank. I want it to shoot at me when he sees me, therefore first destroying the planks. Then the player can pick it up easily and place it anywhere it needed (and can call for a new turret fizzling the old one, with a button). Its for a later puzzle, where the player uses the turret to destroy similar obstacles (wooden planks) to clear the way for a funnel in a tunnel.
There are 2 problems:
1. it only shots if it sees me (so there must be holes in the plank barricade)
2. but if it see me, half of the bullets hit me too. I dont want the player to get hurt intentionally.
So I tought maybe I can make a button that forces the turret to shot ahead for 1-2 second. But how?
In citizen mode (inactive/not shooting by default) the only think I found is the FireBullet input, but thats broen I think. It makes to shot 0.3 second 1-2 bullet randomly (just like when I flip it over). Even if I place an info_target or any other target, and I tell it to firebullet at that, it shots randomly.
So is there a way without scripts to force it to shoot straigth ahead for 1-2 second, then stop? What kind of target it needs? or if it needs a script, how I set it up? I never did scripts and dont even know how to use one or what to edit.
If all fails, I can put an extra glass more ahead of the turret, so it still sees me but while or after the planks got destroyed, the player still unhurt. Knowing the mapname where valve made a turret to shot also can help, cant remember where it was.
Quote from FelixGriffin on July 9, 2012, 1:15 pmEasiest way: a func_breakable Block Bullets field behind the planks.
You can also use an ai_relationship to make it attack something.
Easiest way: a func_breakable Block Bullets field behind the planks.
You can also use an ai_relationship to make it attack something.
Quote from DaMaGepy on July 9, 2012, 1:17 pmFelixGriffin wrote:Easiest way: a func_breakable Block Bullets field behind the planks.You can also use an ai_relationship to make it attack something.
Ye I used func_breakable, but still when it gets destroyed then all the bullets hit me, and if they hit an invisible wall (I turn the field off with delay) that also looks weird.
will check that ai_relationship thing, but if it only tries to shot me when behind the planks, and turns friendly after it gets destroyed, thats, again, weird. And its target is random (different), not a specific target. Its based on where I place it.
So how can I make it to just shot at command, and only straight ahead?
You can also use an ai_relationship to make it attack something.
Ye I used func_breakable, but still when it gets destroyed then all the bullets hit me, and if they hit an invisible wall (I turn the field off with delay) that also looks weird.
will check that ai_relationship thing, but if it only tries to shot me when behind the planks, and turns friendly after it gets destroyed, thats, again, weird. And its target is random (different), not a specific target. Its based on where I place it.
So how can I make it to just shot at command, and only straight ahead?
Quote from FelixGriffin on July 9, 2012, 2:37 pmMake it hate a target parented to it, which turns on and off to make it shoot.
Make it hate a target parented to it, which turns on and off to make it shoot.
Quote from Skotty on July 9, 2012, 5:39 pmFelixGriffin wrote:Make it hate a target parented to it, which turns on and off to make it shoot.npc_bullseye
npc_bullseye

Quote from josepezdj on July 10, 2012, 4:00 amHey Damagepy, what about using the "depleteammo" input triggered after breaking the wooden planks so it can't shoot more bullets anymore? Then if the player needs bullets again fior breaking another thing, he can press that button and a new turret will be spawned. Or you ca use the "Restoreammo" input whenever you need it to have ammunition again.
Btw, looks like you are developing a very interesting and creative map in the woods! Keeep on that good job!
Hey Damagepy, what about using the "depleteammo" input triggered after breaking the wooden planks so it can't shoot more bullets anymore? Then if the player needs bullets again fior breaking another thing, he can press that button and a new turret will be spawned. Or you ca use the "Restoreammo" input whenever you need it to have ammunition again.
Btw, looks like you are developing a very interesting and creative map in the woods! Keeep on that good job!
Quote from DaMaGepy on July 10, 2012, 6:58 amye but thats not logical. Either:
1. The turrets want to shot you, then why stop if the obstacle is destroyed, then later start again?
2. The turret just shots ahead on command. This seems logical.Tried the bullseye and gave its name as targetname, but not worked. Will test that ai_relationship thing with it too, but I think I stay with the normal turret. Will just use an extra glass to prevent the player getting hurt.
Quote:Btw, looks like you are developing a very interesting and creative map in the woods! Keeep on that good job!ye, and as usually, I try to implement unusual puzzles. Friends can test the map as I make it, I upload the latest version to workshop at the end of the day(s).
The theme for the map will be: when aperture is out of money / when no money for chambers
No money for test chambers with lots beams panels etc, so they use caves, abandoned mines and a controlled outdoor environment (still no escape) to reduce the expenses, they also salvaging old test chambers/objects, so rarely there will be old-style wallparts and some wood-plank patched walls etc
ye but thats not logical. Either:
1. The turrets want to shot you, then why stop if the obstacle is destroyed, then later start again?
2. The turret just shots ahead on command. This seems logical.
Tried the bullseye and gave its name as targetname, but not worked. Will test that ai_relationship thing with it too, but I think I stay with the normal turret. Will just use an extra glass to prevent the player getting hurt.
ye, and as usually, I try to implement unusual puzzles. Friends can test the map as I make it, I upload the latest version to workshop at the end of the day(s).
The theme for the map will be: when aperture is out of money / when no money for chambers
No money for test chambers with lots beams panels etc, so they use caves, abandoned mines and a controlled outdoor environment (still no escape) to reduce the expenses, they also salvaging old test chambers/objects, so rarely there will be old-style wallparts and some wood-plank patched walls etc
Quote from Fracture on August 9, 2012, 1:13 amI am having a similar issue like this. I want a turret to guard something from me, and keep its laser eye staring me down like its paranoid. And only if i get too close should i have it fire at me, and when i get pushed back it will stop firing. I tried surrounding the turret with a trigger that is set to restore and deplete it's ammo via my interaction... but it doesn't seem to work at all
I am having a similar issue like this. I want a turret to guard something from me, and keep its laser eye staring me down like its paranoid. And only if i get too close should i have it fire at me, and when i get pushed back it will stop firing. I tried surrounding the turret with a trigger that is set to restore and deplete it's ammo via my interaction... but it doesn't seem to work at all
Quote from Skotty on August 9, 2012, 7:38 amYou could try to change its relationship to the player via input SetRelationship or ai_relationship.
If set to neutral or friendly, it should stop shooting.
You could try to change its relationship to the player via input SetRelationship or ai_relationship.
If set to neutral or friendly, it should stop shooting.
Quote from Moth on August 18, 2012, 10:35 pmtools/tooldblock_los
this texture is a solid barrier to turrets (completely invisible too, as far as visuals go)
I used it in my map to prevent the player from being shot by turrets.
tools/tooldblock_los
this texture is a solid barrier to turrets (completely invisible too, as far as visuals go)
I used it in my map to prevent the player from being shot by turrets.

"Such monstrous sucking-constructions aren't built within one afternoon"