preventing gun pickup for certain players
Quote from DaMaGepy on April 6, 2013, 12:51 amAgain, without reading the comments, I tell u how I should do it (sorry if it already got answered):
If the players start at a different locations, then just put 4 trigger at each spawnpoint that activates a different another trigger thus identifies the player. For example if only player 2 and 3 allowed to pick up an object (gun), then its maybe possible to only enable 2 trigger (out of 4) for that 2 player. But its easier just make it a way that only the first 2 who goes there can pick it up.
About the pickup: just use a static model (or dynamic_override, does not matter) and put a trigger around it. on touch, just kill the prop, and add the portalgun with the clientcommand and disable/kill the trigger. This way u can also pick up other objects oldschool, just by walking thru them (there can be a soundeffect too).
Dont know how can it work if a player with the gun dies (I mean how to determine if it had a gun or not, so it can be added automatically on next spawn (or not) if the goal is to only have 2 player with a portal gun.
Again, without reading the comments, I tell u how I should do it (sorry if it already got answered):
If the players start at a different locations, then just put 4 trigger at each spawnpoint that activates a different another trigger thus identifies the player. For example if only player 2 and 3 allowed to pick up an object (gun), then its maybe possible to only enable 2 trigger (out of 4) for that 2 player. But its easier just make it a way that only the first 2 who goes there can pick it up.
About the pickup: just use a static model (or dynamic_override, does not matter) and put a trigger around it. on touch, just kill the prop, and add the portalgun with the clientcommand and disable/kill the trigger. This way u can also pick up other objects oldschool, just by walking thru them (there can be a soundeffect too).
Dont know how can it work if a player with the gun dies (I mean how to determine if it had a gun or not, so it can be added automatically on next spawn (or not) if the goal is to only have 2 player with a portal gun.

Quote from ChickenMobile on April 6, 2013, 9:21 amI think this has been asked to me before by LPFreaky. In the Valentines map only the correct player can pick up their guns at the start.
Decompile it and have a look.However what I did suggest to LP was to use a player_equip when a certain player touched a trigger with a filter. The actual guns could be fake (a prop_dynamic).
I saw this technique done in a version of biohazard for HL2DM so then the weapons can look cool on their rotating platforms.
(upgrading the guns will be necessary)I cant remember if this is what she used in the end. Seriously decompiling is your friend.
I think this has been asked to me before by LPFreaky. In the Valentines map only the correct player can pick up their guns at the start.
Decompile it and have a look.
However what I did suggest to LP was to use a player_equip when a certain player touched a trigger with a filter. The actual guns could be fake (a prop_dynamic).
I saw this technique done in a version of biohazard for HL2DM so then the weapons can look cool on their rotating platforms.
(upgrading the guns will be necessary)
I cant remember if this is what she used in the end. Seriously decompiling is your friend.
Quote from srs bsnss on April 6, 2013, 10:51 amChickenMobile wrote:I think this has been asked to me before by LPFreaky. In the Valentines map only the correct player can pick up their guns at the start.
Decompile it and have a look.However what I did suggest to LP was to use a player_equip when a certain player touched a trigger with a filter. The actual guns could be fake (a prop_dynamic).
I saw this technique done in a version of biohazard for HL2DM so then the weapons can look cool on their rotating platforms.
(upgrading the guns will be necessary)I cant remember if this is what she used in the end. Seriously decompiling is your friend.
Aperture Valentine used:
- a trigger_playerteam
- a coop_manager
- a func_brush (which blocks the player)
- a weapon_portalgun (Starting team = orange)
- a prop_dynamic (portalgun model)For Orange's gun:
- when the trigger_playerteam was touched by Blue, it set the coop_manager's StateA to 'False'
- when it was touched by Orange, it set the coop_manager's StateA to 'True'- when the coop_manager's StateA was 'True', it disabled the invisible func_brush
- when it was 'False', it enabled the invisible func_brush- when the player picked up the weapon_portalgun, it killed the prop_dynamic
All this, I found just from a decompile. Like ChickenMobile said, decompiling is your friend.
Decompile it and have a look.
However what I did suggest to LP was to use a player_equip when a certain player touched a trigger with a filter. The actual guns could be fake (a prop_dynamic).
I saw this technique done in a version of biohazard for HL2DM so then the weapons can look cool on their rotating platforms.
(upgrading the guns will be necessary)
I cant remember if this is what she used in the end. Seriously decompiling is your friend.
Aperture Valentine used:
- a trigger_playerteam
- a coop_manager
- a func_brush (which blocks the player)
- a weapon_portalgun (Starting team = orange)
- a prop_dynamic (portalgun model)
For Orange's gun:
- when the trigger_playerteam was touched by Blue, it set the coop_manager's StateA to 'False'
- when it was touched by Orange, it set the coop_manager's StateA to 'True'
- when the coop_manager's StateA was 'True', it disabled the invisible func_brush
- when it was 'False', it enabled the invisible func_brush
- when the player picked up the weapon_portalgun, it killed the prop_dynamic
All this, I found just from a decompile. Like ChickenMobile said, decompiling is your friend.
Quote from lord_blex on April 6, 2013, 11:15 amFelixGriffin wrote:EDIT: Wait, I know this error. You can get it if a texture isn't aligned to either world or face. Did you use an old version of the random wall generator recently?I don't even know what that is
srs bsnss wrote:Like ChickenMobile said, decompiling is your friend.I know, I have like 10 decompiled maps on my desktop. But decompiling Aperture Valentine doesn't really help me, because that map only had 2 players: a blue and an orange. I have 4 and as far as I know, they might as well be all blue..
Also, I seem to have found the problem with my brush entity and trigger not cooperating. I think after I parent the brush to the player it just stops being recognized by the trigger. I might just return to changing the player model and trying to filter that. I just realized I'll have to use player filtering at respawns as well and this parenting stuff is just getting more and more complicated. I really wanted it to work though...
I don't even know what that is
I know, I have like 10 decompiled maps on my desktop. But decompiling Aperture Valentine doesn't really help me, because that map only had 2 players: a blue and an orange. I have 4 and as far as I know, they might as well be all blue..
Also, I seem to have found the problem with my brush entity and trigger not cooperating. I think after I parent the brush to the player it just stops being recognized by the trigger. I might just return to changing the player model and trying to filter that. I just realized I'll have to use player filtering at respawns as well and this parenting stuff is just getting more and more complicated. I really wanted it to work though...