Portal 2

Portal 2

Community maps. For science.
Welcome to Aperture Laboratories, home of the Perpetual Testing Initiative. Easily create, share and play test chambers authored by and for the Portal 2 community. Do your part! Contribute to Science!
Learn More
Turrets can't shoot though portals?
I tried to make a map called portal combat (based off of the plants vs zombies mini game) were one player has a turret (pee shooter) and a portal next to it and tries to kill the other player before he trigger his lawn mowers then gets past. But the turret will not shoot ☹ unless your on the other side of the portal. I know it works because I have been kill by a turret through a portal .
< >
Showing 1-11 of 11 comments
TeamSpen210 18 May 5, 2015 @ 2:55pm 
Turrets do this in Portal 1, but it's disabled in Portal 2. The Turret Intro map's developer commentary states that they changed this to reduce frustration, since it's not good for a player to place a portal and suddenly die from a turret firing at a crazy angle. Bullets can still go through portals fine. I believe there's a server variable to toggle this, which you could enable in a hammer map.
toncica 46 May 5, 2015 @ 2:56pm 
Source: https://developer.valvesoftware.com/wiki/Portal_2_Puzzle_Maker/FAQ

Why can't Turrets shoot through portals?

This is intentional and by design. During the game's development, turrets could shoot through portals. This led to several bad experiences where playtesters would place a portal and then instantly get mowed down by bullets from an unseen direction. It often wasn't clear to players that it was a result if something they had done, and it really interfered with puzzle-solving. Changing it so that turrets can't shoot through portals helped a lot, and allowed for better puzzles in general.

Note: If you want turrets to shoot through portals, open up [Steam]/steamapps/common/portal 2/sdk_content/maps/instances/p2editor/turret.vmf in a text editor, find the turret object, and change the "fire through portals" value from 0 to 1.
Originally posted by pizzascience:
I tried to make a map called portal combat (based off of the plants vs zombies mini game) were one player has a turret (pee shooter) and a portal next to it and tries to kill the other player before he trigger his lawn mowers then gets past. But the turret will not shoot ☹ unless your on the other side of the portal. I know it works because I have been kill by a turret through a portal .
This is intentional; during development, turrets can shoot through portals. However, the playtesters were frustrated when they place a portal down and boom: dead from an unseen direction. Valve changed this so turrets does the opposite. This helped a lot for playtesters, and remained into the final version.

However, if you want to make turrets shoot through portals, set fire through portals to "Yes" (with SmartEdit) or 1 (without SmartEdit).
pizzascience 36 May 19, 2015 @ 5:41pm 
were do I put this?
pizzascience 36 May 21, 2015 @ 2:36pm 
Originally posted by pizzascience:
were do I put this?
were do I type it this in?
Traveler807 16 May 23, 2015 @ 10:48pm 
Firstly if you do this be very very careful. Make a copy of the original ' turret.vmf ' and save it in a safe place. Should things go wrong you can always replace the original file.

If your not confident experimenting in this way, then don't experiment in this way! mistakes could mess up your game.

As Toncica says find the ' turret.vmf ' file usually:
Program Files/Steam/steamapps/common/portal 2/sdk_content/maps/instances/p2editor/turret.vmf

Open a text editor program of your choice 'Notepad' is the first one that comes to my mind, but any text editor should do the trick.
Then drag and drop the ' turret.vmf ' onto the text editor window to open it
Traveler807 16 May 23, 2015 @ 10:50pm 
When I open it looks like this:

versioninfo
{
"editorversion" "400"
"editorbuild" "5685"
"mapversion" "13"
"formatversion" "100"
"prefab" "0"
}
visgroups
{
}
viewsettings
{
"bSnapToGrid" "1"
"bShowGrid" "1"
"bShowLogicalGrid" "0"
"nGridSpacing" "8"
"bShow3DGrid" "0"
}
world
{
"id" "1"
"mapversion" "13"
"classname" "worldspawn"
"detailmaterial" "detail/detailsprites"
"detailvbsp" "detail.vbsp"
"maxblobcount" "250"
"maxpropscreenwidth" "-1"
"skyname" "sky_black_nofog"
}
entity
{
"id" "4"
"classname" "point_template"
"spawnflags" "2"
"targetname" "template_turret"
"Template01" "turret"
"origin" "0 0 8"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
entity
{
"id" "18"
"classname" "logic_relay"
"targetname" "@relay_spawn_3"
connections
{
"OnTrigger" "template_turretForceSpawn0-1"
}
"origin" "0 0 24"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "2"
"classname" "npc_portal_turret_floor"
"AllowShootThroughPortals" "0"
"angles" "0 180 0"
"CollisionType" "0"
"DamageForce" "1"
"DisableMotion" "0"
"Gagged" "0"
"LoadAlternativeModels" "0"
"ModelIndex" "0"
"PickupEnabled" "1"
"SkinNumber" "0"
"spawnflags" "32"
"targetname" "turret"
"TurretRange" "1024"
"UsedAsActor" "0"
"UseSuperDamageScale" "0"
"origin" "0 0 -61"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
cameras
{
"activecamera" "-1"
}
cordons
{
"active" "0"
}
Traveler807 16 May 23, 2015 @ 10:53pm 
The important part is near the end, it defines all the variable for your turret

entity
{
"id" "2"
"classname" "npc_portal_turret_floor"
"AllowShootThroughPortals" "0"
"angles" "0 180 0"
"CollisionType" "0"
"DamageForce" "1"
"DisableMotion" "0"
"Gagged" "0"
"LoadAlternativeModels" "0"
"ModelIndex" "0"
"PickupEnabled" "1"
"SkinNumber" "0"
"spawnflags" "32"
"targetname" "turret"
"TurretRange" "1024"
"UsedAsActor" "0"
"UseSuperDamageScale" "0"
"origin" "0 0 -61"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
Traveler807 16 May 23, 2015 @ 11:19pm 
As you can see: "AllowShootThroughPortals" "0"

1.simply change 0 to 1, then save the file.
2.build and publish your map
3.open again, change back to 0 and save, when you want regular turrets again

In theory it should work, but I've never tried changing .vmf files like this before

BE SURE TO 'BACK UP' THE ORIGINAL FILE BEFORE YOU MESS WITH IT.
IF YOU FEEL NERVOUS ABOUT DOING THIS THEN DONT DO IT!!!

sorry for shouting but please, be very careful. And if you do make a mistake, please dont blame me. You mess with your own game files at your own risk.
Originally posted by Traveler807:
Firstly if you do this be very very careful. Make a copy of the original ' turret.vmf ' and save it in a safe place. Should things go wrong you can always replace the original file.

If your not confident experimenting in this way, then don't experiment in this way! mistakes could mess up your game.

As Toncica says find the ' turret.vmf ' file usually:
Program Files/Steam/steamapps/common/portal 2/sdk_content/maps/instances/p2editor/turret.vmf

Open a text editor program of your choice 'Notepad' is the first one that comes to my mind, but any text editor should do the trick.
Then drag and drop the ' turret.vmf ' onto the text editor window to open it
Originally posted by Traveler807:
When I open it looks like this:

versioninfo
{
"editorversion" "400"
"editorbuild" "5685"
"mapversion" "13"
"formatversion" "100"
"prefab" "0"
}
visgroups
{
}
viewsettings
{
"bSnapToGrid" "1"
"bShowGrid" "1"
"bShowLogicalGrid" "0"
"nGridSpacing" "8"
"bShow3DGrid" "0"
}
world
{
"id" "1"
"mapversion" "13"
"classname" "worldspawn"
"detailmaterial" "detail/detailsprites"
"detailvbsp" "detail.vbsp"
"maxblobcount" "250"
"maxpropscreenwidth" "-1"
"skyname" "sky_black_nofog"
}
entity
{
"id" "4"
"classname" "point_template"
"spawnflags" "2"
"targetname" "template_turret"
"Template01" "turret"
"origin" "0 0 8"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
entity
{
"id" "18"
"classname" "logic_relay"
"targetname" "@relay_spawn_3"
connections
{
"OnTrigger" "template_turretForceSpawn0-1"
}
"origin" "0 0 24"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 500]"
}
}
entity
{
"id" "2"
"classname" "npc_portal_turret_floor"
"AllowShootThroughPortals" "0"
"angles" "0 180 0"
"CollisionType" "0"
"DamageForce" "1"
"DisableMotion" "0"
"Gagged" "0"
"LoadAlternativeModels" "0"
"ModelIndex" "0"
"PickupEnabled" "1"
"SkinNumber" "0"
"spawnflags" "32"
"targetname" "turret"
"TurretRange" "1024"
"UsedAsActor" "0"
"UseSuperDamageScale" "0"
"origin" "0 0 -61"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
cameras
{
"activecamera" "-1"
}
cordons
{
"active" "0"
}
Originally posted by Traveler807:
The important part is near the end, it defines all the variable for your turret

entity
{
"id" "2"
"classname" "npc_portal_turret_floor"
"AllowShootThroughPortals" "0"
"angles" "0 180 0"
"CollisionType" "0"
"DamageForce" "1"
"DisableMotion" "0"
"Gagged" "0"
"LoadAlternativeModels" "0"
"ModelIndex" "0"
"PickupEnabled" "1"
"SkinNumber" "0"
"spawnflags" "32"
"targetname" "turret"
"TurretRange" "1024"
"UsedAsActor" "0"
"UseSuperDamageScale" "0"
"origin" "0 0 -61"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
Originally posted by Traveler807:
As you can see: "AllowShootThroughPortals" "0"

1.simply change 0 to 1, then save the file.
2.build and publish your map
3.open again, change back to 0 and save, when you want regular turrets again

In theory it should work, but I've never tried changing .vmf files like this before

BE SURE TO 'BACK UP' THE ORIGINAL FILE BEFORE YOU MESS WITH IT.
IF YOU FEEL NERVOUS ABOUT DOING THIS THEN DONT DO IT!!!

sorry for shouting but please, be very careful. And if you do make a mistake, please dont blame me. You mess with your own game files at your own risk.
Seriously? I bet you never have any experience with Hammer, did you?

http://i.imgur.com/LlnkHO6.png

There goes a simpler way.
Traveler807 16 May 24, 2015 @ 4:45am 
Well I do have some experience with turrets in hammer. Check out this map if you want proof:)
http://steamcommunity.com/sharedfiles/filedetails/?id=261757031

For Hammer maps
Sure , you can edit the turrets in hammer, its really not hard to do.

For PeTI maps
In this case changing 1 number in a text file with notepad, seems faster and much more simple than exporting and editing in hammer. Its also what valve suggest you do:)
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: May 5, 2015 @ 2:35pm
Posts: 11