Removing coop PortalGun?
Darkylight wrote:
Yeah but I need to make the trigger actuing with some delay after the portalgun appears. I need to make it like in the original maps, without portalgun.
Just scale the trigger brush over the whole spawn area and leave it activated?
Skotty wrote:
Darkylight wrote:Yeah but I need to make the trigger actuing with some delay after the portalgun appears. I need to make it like in the original maps, without portalgun.
Just scale the trigger brush over the whole spawn area and leave it activated?
If I do it, it make not funcional.
Create a env_global and copy into the text field "Global State Set" portalgun_nospawn
It's not in the FGD so it won't appear in the choosing-field. Just write it in the text field and it should work - not tested.
I recommend to download my latest improved FGD files to use a lot of Portal 2 features not featured in Hammer. Improved FGD files
Skotty wrote:
Ha found it. It's so easy.Create a env_global and copy into the text field "Global State Set" portalgun_nospawn
It's not in the FGD so it won't appear in the choosing-field. Just write it in the text field and it should work - not tested.I recommend to download my latest improved FGD files to use a lot of Portal 2 features not featured in Hammer. Improved FGD files
First I tried decompiling valve maps but its not funcional. I did it.
Skotty wrote:
Tried it with env_global and it really doen't work. But in the decompiled map I can't see any other posibility to remove the gun at the beginning.
I thought that this would have to be the answer for the gun to not be there on spawn. I'm going to try this myself.
EDIT: In the campaign they have two info_targets called "supress_orange_portalgun_spawn" and "supress_blue_portalgun_spawn". When I put them in, the players spawned without portal guns. I also hid the env_global and it still made them spawn without portal guns. When I hid the info_targets they spawned with guns.
Therefore these info_targets must be the reason why the bots spawn without guns. I'm guessing that there is some sort of code in the game which does this.
To make this work:
- Create an info_target anywhere in your map.- Change the info_target's name value to either "supress_orange_portalgun_spawn" or "supress_blue_portalgun_spawn" depending on what bot you want to not spawn with a gun.- (optional) Create a logic_script which refers to "debug_scripts/mp_coop_transition_list.nut"- Create a logic_auto and "OnMapSpawn" make your logicscript "RunScriptCode" "MapPostLoaded()" (This is so the coop session starts otherwise you will be disconnected.)
Remember to make one for each player if you want both bots not to spawn with a gun.
ChickenMobile wrote:
Skotty wrote:Tried it with env_global and it really doen't work. But in the decompiled map I can't see any other posibility to remove the gun at the beginning.
I thought that this would have to be the answer for the gun to not be there on spawn. I'm going to try this myself.
EDIT: In the campaign they have two info_targets called "supress_orange_portalgun_spawn" and "supress_blue_portalgun_spawn". When I put them in, the players spawned without portal guns. I also hid the env_global and it still made them spawn without portal guns. When I hid the info_targets they spawned with guns.
Therefore these info_targets must be the reason why the bots spawn without guns. I'm guessing that there is some sort of code in the game which does this.To make this work:
- Create an info_target anywhere in your map.- Change the info_target's name value to either "supress_orange_portalgun_spawn" or "supress_blue_portalgun_spawn" depending on what bot you want to not spawn with a gun.- (optional) Create a logic_script which refers to "debug_scripts/mp_coop_transition_list.nut"- Create a logic_auto and "OnMapSpawn" make your logicscript "RunScriptCode" "MapPostLoaded()" (This is so the coop session starts otherwise you will be disconnected.)
Remember to make one for each player if you want both bots not to spawn with a gun.
wow
Thanks soo much for this, i finally fixed the issue now with this issue where i wanted both players to spawn without portal guns
the way i did it was this
i added a info target for each player so orange and blue and the way i have my map is you have to find the portal guns, so if the player dies before they find the guns then they will still respawn without the guns.....
so then when they actually pick the portal gun up, i got a output in the portal gun onplayerpickup >>> supress_blue_portalgun_spawn kill, that is the info targets name like u said
so this now kills that info target, awesome awesome, soo happy, because before this i was using the weapon strip trigger and this was not working all the time, sometimes they spawned with the guns and others they didnt
so thanks again for this chickenmobile 
LuckyRJ