Is there a command to demote the portal gun? [solved]

Avatar
josepezdj
2,386 Posts
Posted Sep 03, 2013
Replied 13 minutes later

Goldenknighttim wrote:
What I have set up already is very similar to what you are suggesting. The problem is that the portal guns that are spawning on the player are respawning, and forming a pile of portal guns that, for some reason, have 1 portal active.

I don't get it. My setup only gives a gun to the player that died, and only after removing the one that the respawn itself automatically gave him >.<

Advertisement
Registered users don’t see ads! Register now!
Avatar
Goldenknighttim
182 Posts
Posted Sep 03, 2013
Replied 5 minutes later

FelixGriffin wrote:
Why not just use a trigger_multiple > OnStartTouch > !activator > Kill? Or even simpler, a trigger_remove?

The problem with this is that portal guns don't seem to fall under any flags for triggers to recognise. When I tested, I used triggers with these flags:
+clients
+NPCs
+pushables
+physics objects
-only player ally NPCs
-only clients in vehicles
+Everything (not including physics debris)
-Only clients "not" in vehicles
+physics debris
-only NPCs in vehicles (respects player ally flag)
-Correctly account for object mass (trigger_push used to assume 100Kg) and multiple componant physobjs (car, blob...)

I have assumed that this combination of flaggs meant pretty much everything, but portal guns are not affected by a trigger remove with these flags.

Avatar
Goldenknighttim
182 Posts
Posted Sep 03, 2013
Replied 4 minutes later

josepezdj wrote:
Goldenknighttim wrote:

What I have set up already is very similar to what you are suggesting. The problem is that the portal guns that are spawning on the player are respawning, and forming a pile of portal guns that, for some reason, have 1 portal active.

I don't get it. My setup only gives a gun to the player that died, and only after removing the one that the respawn itself automatically gave him >.<

I think you are talking about the respawning portal gun that it gives you while you are in the dropper. I mean the portal gun that the entity maker gives you also respawns with the unwanted settings. Each time you die, the entity maker gives the player 1 more, and something gives the previous portalgun(created by the entity maker) back to where it originally spawned with the unwanted settings.

Avatar
josepezdj
2,386 Posts
Posted Sep 03, 2013
Replied 49 minutes later
Oh, sorry, yeah, you mean the stripped guns, that are left on the floor :biggrin:

What about using a filter_activator_class, with the entity set to weapon_portalgun altogether with a trigger_mutliple under the trigger_weapon_strip that fires the output Kill o OnTrigger?

Avatar
Goldenknighttim
182 Posts
Posted Sep 03, 2013
Replied 30 minutes later
not stripped guns on the floor. In my set up, I have a trigger multiple that stripes the weapon with a seperate player_weaponstrip entity. Then with a half second delay, the trigger will teleport the portal-less portalgun to the player. The player_weaponstrip does not make the gun fly anywhere, it makes the player lower the gun and stop using it. I know that the problem is that all portal guns respawn after a while because the stand that has the triggers that makes the gun unique has a portal gun that respawns a while after it has been picked up. And when that portalgun respawns, it is with the same unwanted settings that the portalguns in my pit have. In a regular hammer map, this wouldn't be happening, but there is something about the PTI maps that makes it happen.

I tried your suggestion anyway, except I put the trigger in my pit under a playerclip and nonsolid brush, which is under the spawn. It didn't work. I always got the impression that the filters made some objects not be able to be detectable. Not that they allow things that wouldn't be detectible to be detectible. So I wouldn't have expected that to work anyway. But thanks for trying to help all the same.

Avatar
josepezdj
2,386 Posts
Posted Sep 04, 2013
Replied 5 hours later

OK, I've made a quick example map in hammer and it works like a charm. Maybe the problem is that you are trying to achieve this via the pti editor?

Check the attached map. Place the .BSP map /maps folder, the file 'mp_coop_portalguns_test.VMF' under sdk_content/maps folder, and finally the modified instance into your folder sdk_content/maps/instances/coop. Run it with the command:

ss_map mp_coop_portalguns_test

The changes from the discussed above are 2:

  • As Felix already said, to use each player as targetname, you can't use the exclamation sign (!) before red or blue, but just that, 'red' and 'blue'.

  • I added one gun for each player (+ one env_entity_maker and point_template per gun) instead of using just one.

Attachments
mp_coop_portalguns_test.7z
0.20 MB 37 downloads
Avatar
BenVlodgi
633 Posts
Posted Sep 04, 2013
Replied 6 hours later
I skimmed... but with the weaponstrip trigger there is a property or flag that kills the stripped gun instead of it flying away
Avatar
josepezdj
2,386 Posts
Posted Sep 04, 2013
Replied 20 minutes later
Oh LOL, you're right Ben! right the first of its properties >.< :biggrin: Easier then.
Avatar
Goldenknighttim
182 Posts
Posted Sep 04, 2013
Replied 4 hours later
ok, can you do me a favor? Can you try putting this setup in your door_entrance_coop_1 and then try creating a pti map (without exporting it). Back it up of course before editing. If it still works perfectly for you, then there is a problem with my, and my friends portal 2 files. However, I expect that you will see what I'm talking about. In your pti map, make sure to leave a way to die, and test by dying multiple times(This is not an attempt to be rude, lol. The portal guns respawn quicker when you die. I don't know how that is going to come across.). I'm very thankful for your patients and help with the problem so far. I won't be able to examine your test until either tonight, or tomorrow, so I can't tell if you edited an exported map from the pti or not. If you did edit a pti map for your test, then don't bother with the favor I asked because the problem would surely be on my computer.

I'm not trying to make a hammer map, I'm trying to mod my pti because school has started, and I no longer have the time to make many maps in hammer. If this was an ordinary map made with hammer, It would be as easy as you say to get this to work, but there is something different about how portal guns spawn with a modded pti, and that's what I need help with.

Avatar
BenVlodgi
633 Posts
Posted Sep 04, 2013
Replied 4 hours later

Goldenknighttim wrote:
ok, can you do me a favor? Can you try putting this setup in your door_entrance_coop_1 and then try creating a pti map (without exporting it). Back it up of course before editing. If it still works perfectly for you, then there is a problem with my, and my friends portal 2 files. However, I expect that you will see what I'm talking about. In your pti map, make sure to leave a way to die, and test by dying multiple times(This is not an attempt to be rude, lol. The portal guns respawn quicker when you die. I don't know how that is going to come across.). I'm very thankful for your patients and help with the problem so far. I won't be able to examine your test until either tonight, or tomorrow, so I can't tell if you edited an exported map from the pti or not. If you did edit a pti map for your test, then don't bother with the favor I asked because the problem would surely be on my computer.

I'm not trying to make a hammer map, I'm trying to mod my pti because school has started, and I no longer have the time to make many maps in hammer. If this was an ordinary map made with hammer, It would be as easy as you say to get this to work, but there is something different about how portal guns spawn with a modded pti, and that's what I need help with.

in short, there is no way to do this in the PTI... there is no demote command
also, just because you are in school doesn't mean you don't have enough time to open hammer... hammer actually takes less time to load up for me than the PTI... and making a brush takes the same time.
you'll have to create a custom item for the pti if you want this effect

Avatar
Goldenknighttim
182 Posts
Posted Sep 04, 2013
Replied 28 minutes later
Not everyone can create maps in hammer that quickely. On average, I have found myself spending about 30 hours on each of my maps(I'm not proficient with hammer yet). What I really enjoy is creating custom mechanics, and creating a map based on those custom mechanics. If I create the mechanic, and mod it into the pti, that cuts my time down significantly. So it is worth it when I am shorter on time.

That said, I don't like giving up. I know by now that the portal gun cannot be demoted with a command. The method Felix suggested,(and that has been repeated several times) is a good idea for getting that done, but this glitch with the portals respawning is getting in the way. I will not give in and let the glitch ruin my maps, or keep me from trying to be creative. I am trying to find a way around it. I am trying to ask for help with getting around this glitch. Even while I ask, I'm looking into it myself.(when I'm not buisy with schoolwork.) If you tell me its impossible, Ill still keep looking and experimenting untill I know why it is impossible(If it really is impossible). I believe I have narrowed down that it is not a script. (I have been thinking it is a script creating the problem for a while) There are only so many more things it could be. Please don't try to discourage me.

Avatar
Goldenknighttim
182 Posts
Posted Sep 05, 2013
Replied 17 hours later
Ok, I've been insisting something that I have found after some more testing to be untrue. First of all, the problem I am having is not pti specific. I tested jozepezdj's map, after testing my own hammer map, and I have found that the portal gun is respawning on hammer maps aswell. The misunderstanding came from the fact that in the hammer map I was testing with, I forgot to add a weapon strip trigger around the gun I was testing. The problem I am having is still there, Its just not a problem with the pti. When I tested jozepezdj's map, I noticed that after dropping in the liquid, the dreaded gun with unwanted settings still spawned under the spawning point. So I guess the only progress I've made so far is that I'm not barking up the wrong tree anymore. Now I'm going to look into why this is a problem on my copy of the game, my friend's copy of the game, and not yours. If anyone could take a closer look and try to find what I'm talking about that would be awesome. Untill I find why this is happening to some people and not others, I have an idea of how to get around the problem I am having. If it works, ill post again letting you know.
Avatar
josepezdj
2,386 Posts
Posted Sep 05, 2013
Replied 9 minutes later
I don't think there's any problem with your files or your friends'... it's just that when you die, a new and fully working gun is given to you, that's all... In that map I showed you how to get rid of that not-desired gun and then give your desired gun to any player... But this can only be made in hammer I guess, due to Ben's reply about the topic :wink:
Avatar
Goldenknighttim
182 Posts
Posted Sep 05, 2013
Replied 2 hours later
Ben said himself that he skimmed through the thread. I don't think he was completely fallowing what we're talking about. I'm going to try attaching the vmf I have been using to test. This will make it clear to you what glitch I am talking about(if it is a problem with everyone coppy of portal 2, which I'm not really convinced of anymore), because it is obvious that your still thinking that I'm refering to the gun that is given to you when you die. This vmf was originally made by chicken mobal, but I have been using it to test many other things. Walk up to the gun, back off, walk up to it again, this will stip your weapon by killing it, then back off agian and wait about 30 seconds. When the new gun pops up, pick it up, and you will see the unwanted settings I am referring to.

As I had just said, I found that the problem I have been having seams to have nothing to do with the pti.

Avatar
Goldenknighttim
182 Posts
Posted Sep 05, 2013
Replied 1 hour later
The next thing I tried didn't work. I figured that I might be able to put a world portal in my pit, and allow the unwanted portal guns to fall into a room that would be too far away from the entrance to conflict with the pti. Unfortunatly, portal guns don't go through world portals. What I tried after that is I removed the bottom of the pit altogether, and widened the mouth of the pit. The portal guns are now pileing up in an area that is unaccessable to the player without the use of noclip, and is too big to pile up and reach the player without dieing way more than what anyone would have the patiants for. The pti forms a cage around the starting area, which is nice because it creates a perfect dumping spot for the unwanted portal guns. Now I need to find a way to stop the portal on the pedistal from comming back. What I plan on trying for that is to have some func_move_linears come up from the block underneath, and I completely expect that to work. If I don't ask for more help on this, then it worked. Thanks for the help, and if anyone finds an explination on why some people see the glitch and others don't, or if anyone finds how to prevent the glitch, then please let me know.
Avatar
BenVlodgi
633 Posts
Posted Sep 05, 2013
Replied 3 hours later
if portal guns are being given to you on spawn.. there is logic in the backgroud doing that... could be in hammer or from the transition scripts
Advertisement
Registered users don’t see ads! Register now!
Avatar
Goldenknighttim
182 Posts
Posted Sep 06, 2013
Replied 15 hours later
The ones being given on spawn are not the problem. I can easily strip those. The problem is the other portal guns That I place down myself. They are respawning, but not with the settings of the originals. I've found a neat way of hiding them, and after more testing that should have been necessary, I found that scripts are not what are making them respawn. Its just something that portal 2 seems to do for coop maps so that if a player dies, they can pick up another portal gun that can only shoot one portal.(Because with the original game mechanics, there is no reason for the player to need any other settings) At least thats my take on why this is happening. I'm not sure. Now that I have a good way of hiding this problem, I'm no longer driven to finding how to prevent it. However, Ill keep my eyes open for a way, and if anyone knows where the problem actually is, and lets me know, Ill look into making a cleaner way of presenting coop mechanics that involve no-portal portalguns. Until then, thanks for the help. I've already made a map with this mechanic, and this weekend, I plan on using the fix to clean up an older mod/mechanic.