In Source games you can directly (with cheats enabled) access the entity network of each map through such commands as "ent_text" and "ent_fire". However, even with cheats enabled, only the first player is able to do this. The other player does not have access to the entity network with the same commands. Is there any way to allow other players access to this network in the same way?
Source Engine entity access sharing
portal-2source-engine
Related Solutions
Chapter 1 - The Courtesy Call
sp_a1_intro1
- Relaxation Vaultsp_a1_intro2
- Original 1sp_a1_intro3
- Original 2sp_a1_intro4
- Original 3 and 4sp_a1_intro5
- Original 5sp_a1_intro6
- Original 6sp_a1_intro7
- Original 7sp_a1_wakeup
- GLaDOSsp_a2_intro
- Original 19
Chapter 2 - The Cold Boot
sp_a2_laser_intro
- GLaDOS 1sp_a2_laser_stairs
- GLaDOS 2sp_a2_dual_lasers
- GLaDOS 3sp_a2_laser_over_goo
- GLaDOS 4sp_a2_catapult_intro
- GLaDOS 5sp_a2_trust_fling
- GLaDOS 6sp_a2_pit_flings
- GLaDOS 7sp_a2_fizzler_intro
- GLaDOS 8
Chapter 3 - The Return
sp_a2_sphere_peek
- GLaDOS 9sp_a2_ricochet
- GLaDOS 10sp_a2_bridge_intro
- GLaDOS 11sp_a2_bridge_the_gap
- GLaDOS 12sp_a2_turret_intro
- GLaDOS 13sp_a2_laser_relays
- GLaDOS 14sp_a2_turret_blocker
- GLaDOS 15sp_a2_laser_vs_turret
- GLaDOS 16sp_a2_pull_the_rug
- GLaDOS 17
Chapter 4 - The Surprise
sp_a2_column_blocker
- GLaDOS 18sp_a2_laser_chaining
- GLaDOS 19sp_a2_triple_laser
- GLaDOS 20sp_a2_bts1
- GLaDOS 21sp_a2_bts2
Chapter 5 - The Escape
sp_a2_bts3
sp_a2_bts4
- Turret Assembly Linesp_a2_bts5
- Neurotoxin Generatorsp_a2_bts6
- Tube ride (no gameplay)sp_a2_core
- Core Swap
Chapter 6 - The Fall
sp_a3_00
- Fallingsp_a3_01
- Ruinssp_a3_03
- Initiative Intro, Alpha Pumpsp_a3_jump_intro
- Blue Gel 1sp_a3_bomb_flings
- Blue Gel 2sp_a3_crazy_box
- Blue Gel 3sp_a3_transition01
- Beta Pump, Potato
Chapter 7 - The Reunion
sp_a3_speed_ramp
- Orange Gel 1sp_a3_speed_flings
- Orange Gel 2sp_a3_portal_intro
- Gamma Pump, White Gel 1sp_a3_end
- Master Pump
Chapter 8 - The Itch
sp_a4_intro
- Wheatley introsp_a4_tb_intro
- Wheatley 1sp_a4_tb_trust_drop
- Wheatley 2sp_a4_tb_wall_button
- Wheatley 3sp_a4_tb_polarity
- Wheatley 4sp_a4_tb_catch
- Wheatley 5sp_a4_stop_the_box
- Wheatley 6sp_a4_laser_catapult
- Wheatley 11sp_a4_laser_platform
- Wheatley 12sp_a4_speed_tb_catch
- Wheatley 15sp_a4_jump_polarity
- Wheatley 16
Chapter 9 - The Part Where…
sp_a4_finale1
- Wheatley 17, This is that part.sp_a4_finale2
sp_a4_finale3
sp_a4_finale4
- That happened.sp_a5_credits
- Credits
To cycle through different names/settings/scripts etc you need to follow the following pattern (At the end there is the full code if you want to skip the details):
Cycling through self made scripts using alias
Step 1: Set a starting point
alias cycler "useName1"
Now if we trigger cycler -> useName1 will be executed.
cycler and useName1 are names i made up. You can change those to whatever fits your needs.
Step 2: Define useName1 and set cycler
alias useName1 "setinfo name "First_name"; alias cycler useName2"
This will execute the namechange (or your script or your setting) and set the cycler to useName2. The next time we trigger cycler -> useName2 will be executed.
useName2 is a name i made up too.
Step 3: Define useName2 and set cycler
alias useName2 "setinfo name "Second_name"; alias cycler useName1"
This will execute the second namechange (or your script or your setting) and set the cycler back to useName1. The next time we trigger cycler -> useName1 will be executed again. The cycle is complete.
Step 4: Bind your cycler to a key
bind "key" cycler
We are done. You can repeat part 2 and 3 for other definitions (if you switch through 15 names, go for it). Just let the last set the cycler onto the first!
Full Code Solution 1
alias cycler "useName1"
alias useName1 "setinfo name "First_name"; alias cycler useName2"
alias useName2 "setinfo name "Second_name"; alias cycler useName1"
bind "key" cycler
Cycling through settings provided by the source engine
If you want to iterate through settings that are predefined by the source engine
and require a number as a value, for example:
net_graph x (value 0 to 3 are possible)
sensitivity x (any value is possible)
then you don't need to use the cycler above.
Instead source provides us with two nifty commands:
Toggle
toggle command value1 value2 value3
This command let's us cycle through the setting with specific values.
For example:
toggle net_graph 1 2 3
Starts with executing net_graph 1. Using this command again executes net_graph 2 and so forth.
To use this command quickly just go ahead and bind it to a key
Full Code toggle
bind "x" "toggle net_graph 1 2 3"
Incrementvar
incrementvar command min max steps
This let's us cycle through the setting in defined steps.
For example:
incrementvar net_graph 1 3 1
Starts with net_graph 1 and increases each step +1. This means executing the command again results in net_graph 2. The next would be net_graph 3. After that it will jump back to net_graph 1 because we told him that the max value would be 3.
The other example would be:
incrementvar sensitivity 200 800 200
which increases the sensitivity by 200 each time we execute this until it reaches 800 at which point it will drop to 200 again.
The steps can be negative to (cycle backwards) like:
incrementvar sensitivity 200 800 -200
To use this command we still need to bind it:
Full Code incrementvar
bind "key" "incrementvar sensitivity 200 800 200"
Another Solution
Another solution to cycle through variables (settings,commands etc) would be to rebind the button directly.
This however is discouraged since it takes more resources from the system while just changing an alias to another does not interfere with keymapping at all which is therefore quite static.
Still I will show it for completeness
Full Code Solution 2
alias useName1 "setinfo name "First_name"; bind "key" useName2"
alias useName2 "setinfo name "Second_name"; bind "key" useName1"
bind "key" useName1
Best Answer
The reason this happens is because the first player is the one hosting the game. Only the host has access to the engine like that. Source does not support firing outputs on entities directly over the network.
So unfortunately, no, there is no way for the second player to use
ent_fire
.