Turrets that dont kill you

Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
I was wondering if anyone could help me, I need an unusual turret for part of a map im making.
Basically, I need it to open up like its going to attack, but not. It also needs to follow the player with its laser like they normally do, and then retract on command. Ive experimented with placing walls of varying textures (invisible, nodraw, blockbullets, etc.) in front of the turrets but none suffice. (the player cant get to the turrets anyway) Ive tried playing around with options for the entity, but the closest I can come is the out of ammo flag, which does everything required but has a flashing laser instead of a steady one. Basically, im thinking now that im going to have to play around with code, which i have no experience with (and in fact I cant even find the relevant codes :lol: )
So if anyone here can help me it would me much appreciated.
EDIT: also, i dont know if this is relevant, but I will want several, and I dont want them to talk.
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Sep 15, 2011
Replied 1 hour later
Well obviously you've been putting the wrong texture in. Try BlockLOS (Block Line Of Sight). This will make the turret not be able to shoot you, however I do not know if they open up to attack.

P.S. Isn't there a flag on the turrets that make them have no bullets? Or more importantly: does this work?

Avatar
satchmo
415 Posts
Posted Sep 15, 2011
Replied 5 minutes later
As the original poster said, he does not like the "out of ammo" option because the laser flashes.

But I think that may be the best option for him.

Avatar
Rubrica
305 Posts
Posted Sep 15, 2011
Replied 2 hours later
I don't know if this would work, but there is a 'citizen modified (friendly)' flag on the turret entity.
Avatar
satchmo
415 Posts
Posted Sep 15, 2011
Replied 2 hours later

Rubrica wrote:
I don't know if this would work, but there is a 'citizen modified (friendly)' flag on the turret entity.

I tried that before. The "friendly" turret would just sit there silently, doing nothing. The laser would be on, but it wouldn't track the player.

Actually, it would be equivalent of a normal turret, except that the player would appear invisible to it.

Avatar
Random
171 Posts
Posted Sep 15, 2011
Replied 34 minutes later
What exactly goes wrong when you use the blockbullets texture? Is it because it blocks the eye-laser? If so, I agree the out-of-ammo flag is probably the best fit.
And to have them not talk, use the "turret is gagged" option.
Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
Replied 4 hours later
yeah,, ive tried blockLOS and blockbullets-the former means the turret doesnt open up or follow you (as it cant see you) the latter blocks the eye laser. I think i may have found a soloution though, in making a wall of blockbullets but with a small hole for the laser to go through. i just have to tweak the size a bit to get the appropriate field of view for the turret and to make a hole it cant shoot through.
thanks for your suggestions.
Avatar
spongylover123
944 Posts
Posted Sep 15, 2011
Replied 22 minutes later

Spam Nugget wrote:
yeah,, ive tried blockLOS and blockbullets-the former means the turret doesnt open up or follow you (as it cant see you) the latter blocks the eye laser. I think i may have found a soloution though, in making a wall of blockbullets but with a small hole for the laser to go through. i just have to tweak the size a bit to get the appropriate field of view for the turret and to make a hole it cant shoot through.
thanks for your suggestions.

Is this turret a character (has a role)?
You can set the maximum range to 0, it won't track you like you want, but it's laser isn't going to flicker, anyway, just an idea

Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
Replied 10 minutes later

spongylover123 wrote:
Spam Nugget wrote:

yeah,, ive tried blockLOS and blockbullets-the former means the turret doesnt open up or follow you (as it cant see you) the latter blocks the eye laser. I think i may have found a soloution though, in making a wall of blockbullets but with a small hole for the laser to go through. i just have to tweak the size a bit to get the appropriate field of view for the turret and to make a hole it cant shoot through.
thanks for your suggestions.

Is this turret a character (has a role)?
You can set the maximum range to 1, (anyway, just an idea)

Thanks for the idea, but the turret just ignores you completely. And the turrets are kind of a charector i guess, I juust want a bunch of them sitting there looking menacing and ready to kill you while GLaDOS will talk to the player.

Avatar
spongylover123
944 Posts
Posted Sep 15, 2011
Replied 15 minutes later
You mean like at The end when you ride up the elevator and the door opens and 4 turrets track you and then play a song?

You may need to edit the models and the turret scripts, because the laser comes separately

Avatar
MasterLagger
1,695 Posts
Posted Sep 15, 2011
Replied 23 minutes later
Have the Citizen Modified Flag on. I've done it before and it works.
Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
Replied 4 minutes later
The citizen modified flag just makes them ignore the player entirely, I need them to track the player but not to shoot. And yeah, spongylover123 i thought i might have to edit the scripts, but I dont even know where they are, let alone how to edit them properly.
Avatar
MasterLagger
1,695 Posts
Posted Sep 15, 2011
Replied 8 minutes later
How about an invisible glass? Turrets track you through glass but don't shoot you.
Avatar
spongylover123
944 Posts
Posted Sep 15, 2011
Replied 6 minutes later

MasterLagger wrote:
How about an invisible glass? Turrets track you through glass but don't shoot you.

The laser would just stop at the glass, and also the glass' color is translucent aqua

Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
Replied 5 minutes later

spongylover123 wrote:
MasterLagger wrote:

How about an invisible glass? Turrets track you through glass but don't shoot you.

The laser would just stop at the glass, and also the glass' color is translucent aqua

Hence 'invisible glass' :lol:
But yeah, the laser stops there, which is why im trying to do this thing with blockbullets with a hole in it.

Avatar
spongylover123
944 Posts
Posted Sep 15, 2011
Replied 10 minutes later
About the block bullets texture, you need to tie the brush to a func_brush and set solidity to solid, make as small as possible
Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
Replied 1 hour later
I'm starting to think this blockbullets soloution wont work...no matter how small I have the hole, the turret still tries to shoot at the player when they stand directly in front of it. So i'm back at square one.
Avatar
Vordwann
767 Posts
Posted Sep 15, 2011
Replied 1 minute later
There must be some way to make invisible glass that still functions as glass...
Avatar
spongylover123
944 Posts
Posted Sep 15, 2011
Replied 17 minutes later

Vordwann wrote:
There must be some way to make invisible glass that still functions as glass...

The only way is to rescript the turret script file.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Spam Nugget
492 Posts
Posted Sep 15, 2011
Replied 17 minutes later

spongylover123 wrote:
Vordwann wrote:

There must be some way to make invisible glass that still functions as glass...

The only way is to rescript the turret script file.

Does anyone know where the script file is? I mean, if I can at least find it, I can play around with it and see if I can get what I want.