Please or Register to create posts and topics.

Forcing a turret to shot for 1-2 second

Page 1 of 2Next

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.

-= Check out my maps: workshop, and their .vmf sources: homepage =-

Easiest way: a func_breakable Block Bullets field behind the planks.

You can also use an ai_relationship to make it attack something.

Falsi sumus crusto!
FelixGriffin 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?

-= Check out my maps: workshop, and their .vmf sources: homepage =-

Make it hate a target parented to it, which turns on and off to make it shoot.

Falsi sumus crusto!
FelixGriffin wrote:
Make it hate a target parented to it, which turns on and off to make it shoot.

npc_bullseye

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! :thumbup:

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

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.

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 :)

-= Check out my maps: workshop, and their .vmf sources: homepage =-

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

Just when I think I understand the system, it changes on me.

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.

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.

Image

"Such monstrous sucking-constructions aren't built within one afternoon"
Page 1 of 2Next