Turrets and Outputs.

Avatar
Fracture
797 Posts
Posted Nov 28, 2012
So I want to take full advantage of a turret having a friendly mode and use it as a testing element that can fire at enemy turrets or anything i set a bullseye on. However I noticed the bugs concerning it's abilities, or lackthereof and it presents me with the following issues;

I am using a backwards turret. This is preferred and it won't be changed unless it is a last resort.

If it gets tipped over by any means, it freaks out until it deactivates.

Enabling does not reactivate a deactivated turret. But apparently telling to fire at a target does.

Carrying an enabled backwards friendly turret will make it kill the player when it sees an enemy

Frequent use of disable/enable/toggle and pickup/drop outputs haven't been able to negate any of the problems dictated. Essentially I want this turret to be a gimp that rebels against Aperture after being dumped in a landfill. Are there any hidden outputs that i can use that are not listed?

Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Nov 28, 2012
Replied 7 hours later
Not really. Try using a combine turret and setting it to the Aperture model.
Avatar
CamBen
973 Posts
Posted Nov 28, 2012
Replied 1 hour later
What entity would the combine turrets be in portal 2?
Avatar
BenVlodgi
633 Posts
Posted Nov 28, 2012
Replied 9 minutes later

CamBen wrote:
What entity would the combine turrets be in portal 2?

same entity they were in HL2

Avatar
Fracture
797 Posts
Posted Nov 28, 2012
Replied 2 hours later
Never played half life, actually.
Avatar
Lpfreaky90
2,842 Posts
Posted Nov 28, 2012
Replied 4 minutes later

Fracture wrote:
So I want to take full advantage of a turret having a friendly mode and use it as a testing element that can fire at enemy turrets or anything i set a bullseye on. However I noticed the bugs concerning it's abilities, or lackthereof and it presents me with the following issues;

I am using a backwards turret. This is preferred and it won't be changed unless it is a last resort.

I'd say a forward turret is much easier since:
- you can actually properly aim.
- the turret won't accidentally shoot you.
- you have a tiny bit of protection from the turret.

Quote:
If it gets tipped over by any means, it freaks out until it deactivates.

Try finding out when the OnTipped output fires; maybe then spawn a new one in that same location?

Quote:
Enabling does not reactivate a deactivated turret. But apparently telling to fire at a target does.

Use DepleteAmmo and RestoreAmmo maybe?

Well; those are my thoughts

Avatar
Lpfreaky90
2,842 Posts
Posted Nov 28, 2012
Replied 4 minutes later

Fracture wrote:
Never played half life, actually.

https://www.youtube.com/watch?v=r4bp8stxhS0

Avatar
Fracture
797 Posts
Posted Nov 28, 2012
Replied 21 minutes later
according to the wiki, the ammo inputs are actually bugged and do not function at all.

the tipped output actually doesn't engage until the turret is fully deactivated after it freaks out.

and unfortunatly i havent any halflife entities. can i even get those? will they work on other peoples computers if they don't have halflife? I don't even know.

EDIT: I just had an idea involving adding a trigger parented to the turret that enables it when an enemy npc is in range, and picking up the turret disables it and the trigger. The only issue is that it will get set off inspite of a wall between them

Avatar
FelixGriffin
2,680 Posts
Posted Nov 28, 2012
Replied 3 hours later
Yes, they will. They're remnants of the old code left over in P2, although their model is gone. It's npc_turret_floor, give it the proper model, make it gagged and use ambient_generics to play your lines from it. It'll repair itself if picked up, and has a flag that makes it not even TRY to fire at the player. Use an ai_relationship to make it hate whatever you want, and it'll kill it if it gets in range.
Avatar
Fracture
797 Posts
Posted Nov 28, 2012
Replied 23 minutes later
I actually already have that setup, the problem is the npc_turret_floor doesn't have all the properties it is supposed to like the portal turrets. I think I would only have those proper entities files if i had halflife on my system.
Avatar
CamBen
973 Posts
Posted Nov 28, 2012
Replied 1 minutes later
wow, this was useful to me too! never mapped for hl2 or portal 1, so, i didn't really know :lol:

also, the turret would be broken, so it wouldn't have to be able to do everything.

Avatar
FelixGriffin
2,680 Posts
Posted Nov 28, 2012
Replied 2 hours later
The only thing missing is the model, if it's in the FGD. Look over on the VDC for information. FGDs aren't shared, so having HL2 wouldn't even be able to change anything.
Avatar
Fracture
797 Posts
Posted Nov 28, 2012
Replied 28 minutes later
well i really didn't want to use the hl2 turrets, is it possible to use the portal 2 turrets with that entity?
Avatar
FelixGriffin
2,680 Posts
Posted Nov 28, 2012
Replied 32 minutes later
Sure, just set the model to whatever you want. The AI is exactly the same, with 3 exceptions:
- Combine turrets can be reactivated.
- Portal turrets can be blue-gelled.
- Combine turrets are fire-resistant.
Avatar
Fracture
797 Posts
Posted Nov 29, 2012
Replied 3 hours later
dude, wut? I don't think this is right here.
Avatar
FelixGriffin
2,680 Posts
Posted Nov 29, 2012
Replied 8 hours later
That's because it's trying to use the default model. Make a prop_dynamic of a Portal turret, turn SmartEdit off, copy the studio keyvalue, and put it on the Combine one.
Avatar
zivi7
649 Posts
Posted Nov 29, 2012
Replied 26 minutes later
Nice, Felix, that's good to know.

Before this ends like last time:

Place a npc_turret_floor. Double click it. Click on "SmartEdit" in the upper right corner. New buttons will appear. Click on "Add". Where it asks for "Key", type "model" without quotation marks. Where it asks for "value", type "models/npcs/turret/turret.mdl" without quotation marks. Click on "SmartEdit" again. Now you should see the options you saw before plus the model you just set.

The only problem now is: When the turret is firing, the screen goes red with missing tracers that aren't precached.

Avatar
josepezdj
2,386 Posts
Posted Nov 29, 2012
Replied 8 minutes later

zivi7 wrote:
Before this ends like last time:

LOL

Avatar
zivi7
649 Posts
Posted Nov 29, 2012
Replied 44 minutes later
I was wrong, sorry!

First of all, to get rid of the tracer problem, just place a normal portal turret somewhere in the map. This way, those effects get loaded and can be used by the makeshift HL2 turret as well.

However, I couldn't get the HL2 turret to hurt the player. It does activate and shoot, but the player doesn't get hurt. I didn't realize this was this way because of the redness of the missing particles earlier.

When you set the HL2 turret to Citizen friendly, it automatically engages normal Portal turrets, you don't even need to set the ai_relationship.

But: When tipped over, the turret still shuts down and doesn't set upright again when you pick it up. Only when you use edges in the world to fiddle with the model so that it is set upright while you hold it, the turret activates again.

I tried adding Preferred Player-carry angles to the key values to fix this, but I either did something wrong or it doesn't work. The ingame turret ignored the angles I wanted to set.

edit: One more problem: The HL2 turret has a key value for the skin number just like the normal Portal turret. Both values have the description that leaving this value at 0 means that the skin gets chosen randomly. While the normal portal turret uses the white standard skin with the number 0, the HL2 turret really takes a random skin - so it randomly appears speed or bounce gel painted.

Advertisement
Registered users don’t see ads! Register now!
Avatar
CamBen
973 Posts
Posted Nov 29, 2012
Replied 57 minutes later
You could hex edit a turret/backwards turret to have all of its skins as skin 0, so all the random skins are the same.