Removing coop PortalGun?

Quote from ChickenMobile on July 6, 2011, 11:06 pmSkotty 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.
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.
Quote from LuckyRJ on November 12, 2012, 8:16 amChickenMobile 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
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