Is there a command to demote the portal gun? [solved]
Hope that helps.
TeamSpen210 wrote:
You might be able to strip the portal gun from the player then teleport a weapon_portalgun set to not fire either portal to the player. I don't know how the gun will behave if you give a player one of those, you might want to test it first.
Exactly as you'd expect. It's a viewmodel without a weapon effect. If you put one in a template you can use an entitymaker to ForceSpawnAtEntityOrigin red or blue.
The weapon is stripped, but the portalgun doesn't upgrade. Thats when I decided to test the command manually, and I found that the command doesn't work in coop. Ill look into trying teamspen's and Felix griffin's idea.
As for giving a one portal portalgun the gun could be stripped and then equipped by a player_equip.
I do remember making an example for this however (but I cannot find it) so you can see how I did this with the linked portals map I made with LPfreaky90. FreakyChicken's Portals of Doom and Friendship prt1
You're welcome to decompile it and look what I did here to give them one portalguns. - the entities you need are somewhere in the first puzzle room.
ChickenMobile wrote:
Are you using a point_playercommand to execute the commands (upgrade_portalgun)? Because I know for sure that it does work in Coop.As for giving a one portal portalgun the gun could be stripped and then equipped by a player_equip.
I do remember making an example for this however (but I cannot find it) so you can see how I did this with the linked portals map I made with LPfreaky90. FreakyChicken's Portals of Doom and Friendship prt1
You're welcome to decompile it and look what I did here to give them one portalguns. - the entities you need are somewhere in the first puzzle room.
Do you mean point_clientcommand or point_servercommand? There is no point_playercommand that I know of.
Goldenknighttim wrote:
I've been doing some more troubleshooting. I tried to edit the coop door entrance, and I put a trigger in the droppers that would strip the weapon, and a moment later, run the command: upgrade_portalgun.
You can't upgrade something that doesn't exist, don't you think?
You can only fire the command upgrade_portalgun IF the player already has a portalgun, but if you stripped it, there is none.
As said above, you'll need to give the player a portalgun after he has been respawned and his weapon has been stripped, with either "CanFirePortal1" or "2" set to "0". This can be done by making a little room all textured with the nodraw texture outside your map (or at any hidden place inside your map where you know the player won't reach ever). Inside put the entities:
- weapon_portalgun with no fires at all.
- point_template, set the portalgun name as the template 1
- env_entity_maker, and set the name of the point_template as the "Point_template To Spawn"
Now add a trigger_multiple right below the trigger_weapon_strip that you have under the info_coop_spawns and as Felix suggested you only need to use the output ForceSpawnAtEntityOrigin... like so:
Under the Blue player dropper:
- OnTrigger > [env_entity_maker name] > ForceSpawnAtEntityOrigin > !blue
Under the Orange player dropper:
- OnTrigger > [env_entity_maker name] > ForceSpawnAtEntityOrigin > !red
This should work.
josepezdj wrote:
As said above, you'll need to give the player a portalgun after he has been respawned and his weapon has been stripped, with either "CanFirePortal1" or "2" set to "0". This can be done by making a little room all textured with the nodraw texture outside your map (or at any hidden place inside your map where you know the player won't reach ever). Inside put the entities:
- weapon_portalgun with no fires at all.
- point_template, set the portalgun name as the template 1
- env_entity_maker, and set the name of the point_template as the "Point_template To Spawn"
Now add a trigger_multiple right below the trigger_weapon_strip that you have under the info_coop_spawns and as Felix suggested you only need to use the output ForceSpawnAtEntityOrigin... like so:
Under the Blue player dropper:
- OnTrigger > [env_entity_maker name] > ForceSpawnAtEntityOrigin > !blue
Under the Orange player dropper:
- OnTrigger > [env_entity_maker name] > ForceSpawnAtEntityOrigin > !red
This should work.
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. If they pile up, which happens if the player dies enough, the player will be given a portal gun that allows 1 of the portals to be shot. In a regular map made with hammer, this wouldn't be an issue, but I am trying to mod my pti, which for some reason causes portal guns to respawn, and they don't respawn with the original's settings. They have a default setting that I have already discribed. If I can find a way to stop them from respawning, or a way to destroy the ones that have respawned, then I will have my answer. Thanks for the help so far, I feel like I'm very close.
FelixGriffin wrote:
Why not just use a trigger_multiple > OnStartTouch > !activator > Kill? Or even simpler, a trigger_remove?
Thanks, Ill try those now and let you know if any of them work.