A problem with point_servercommand
Quote from Sindri on July 3, 2013, 1:46 pmOn a map I want the player to be able to trigger a certain logic_relay just by pressing one key (v).
the point_servercommand entity seemed to be a nice way to issue a bind command for a ent_fire which would then trigger the logic_relay. However, it won't work. I suspect a problem with the syntax of my output (on a logic_auto for binding on mapspawn). Heres what the output looks like:
onMapSpawn@servercommand
command
bind v ent_fire relay01 user1
I'd greatly appreciate some help.
Sindri
On a map I want the player to be able to trigger a certain logic_relay just by pressing one key (v).
the point_servercommand entity seemed to be a nice way to issue a bind command for a ent_fire which would then trigger the logic_relay. However, it won't work. I suspect a problem with the syntax of my output (on a logic_auto for binding on mapspawn). Heres what the output looks like:
onMapSpawn
@servercommand
command
bind v ent_fire relay01 user1
I'd greatly appreciate some help.
Sindri
Quote from FelixGriffin on July 3, 2013, 2:35 pmYou should put an @ in front of your relay's name, to prevent name fixup, and use the parameter "bind v ent_fire @relay01 trigger" in the servercommand.
But binding keys in a map is a bad idea. They'll override players' custom bindings, and be applied permanently. If another map features a @relay01 it will also be triggered by pressing v, even if v used to be the player's binding for (in my case) removing and replacing the portal gun if something goes wrong.
Try using a logic_playerproxy or a game_ui instead, those are Hammer methods for essentially binding keys that will work across platforms.
You should put an @ in front of your relay's name, to prevent name fixup, and use the parameter "bind v ent_fire @relay01 trigger" in the servercommand.
But binding keys in a map is a bad idea. They'll override players' custom bindings, and be applied permanently. If another map features a @relay01 it will also be triggered by pressing v, even if v used to be the player's binding for (in my case) removing and replacing the portal gun if something goes wrong.
Try using a logic_playerproxy or a game_ui instead, those are Hammer methods for essentially binding keys that will work across platforms.
Quote from Sindri on July 3, 2013, 3:18 pmFelixGriffin wrote:Try using a logic_playerproxy or a game_ui instead, those are Hammer methods for essentially binding keys that will work across platforms.Thanks, I'll look into those and stop bothering about my servercommands (the @ doesn't solve the problem ...)
Sindri
Thanks, I'll look into those and stop bothering about my servercommands (the @ doesn't solve the problem ...)
Sindri
Quote from Lpfreaky90 on July 4, 2013, 2:55 amFirst of; never re-bind any key binds; a lot of mappers have a lot of keybinds for all kinds of different things. I would become a very sad Lpfreaky90 if someone messed with that.
Second of all your command is wrong;
it should beQuote:bind v 'ent_fire @relay01 trigger'Note that the whole command is in quotations; that's what you're binding v to.
Anyways have a nice day
Oh fiddlesticks woops I was totally wrong here; as said below NEVER USE ", use ' instead.
First of; never re-bind any key binds; a lot of mappers have a lot of keybinds for all kinds of different things. I would become a very sad Lpfreaky90 if someone messed with that.
Second of all your command is wrong;
it should be
Note that the whole command is in quotations; that's what you're binding v to.
Anyways have a nice day
Oh fiddlesticks woops I was totally wrong here; as said below NEVER USE ", use ' instead.
Quote from FelixGriffin on July 4, 2013, 9:02 amDon't try what LP said, it'll corrupt your map. NEVER put quote marks in any field in Hammer.
Don't try what LP said, it'll corrupt your map. NEVER put quote marks in any field in Hammer.
Quote from CamBen on July 4, 2013, 11:31 amIf you need to bind a command for the map, just tell the players to bind it themselves, to any key they have available. You can do this by telling them through a game_text, or writing it in the description, or both.
If you need to bind a command for the map, just tell the players to bind it themselves, to any key they have available. You can do this by telling them through a game_text, or writing it in the description, or both.
Aperture Science: We do our science asbestos we can!
Quote from Sindri on July 4, 2013, 4:49 pmThe game_ui works just as i want. The player picks up a remote and the game_ui kicks in. Thanks a lot.
Sindri
The game_ui works just as i want. The player picks up a remote and the game_ui kicks in. Thanks a lot.
Sindri