A problem with point_servercommand

Avatar
Sindri
3 Posts
Posted Jul 03, 2013
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

Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Jul 03, 2013
Replied 48 minutes later
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.

Avatar
Sindri
3 Posts
Posted Jul 03, 2013
Replied 42 minutes later

FelixGriffin 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

Avatar
Lpfreaky90
2,842 Posts
Posted Jul 04, 2013
Replied 11 hours later
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

Quote:
bind v 'ent_fire @relay01 trigger'

Note that the whole command is in quotations; that's what you're binding v to. :wink:

Anyways have a nice day

Oh fiddlesticks woops I was totally wrong here; as said below NEVER USE ", use ' instead.

Avatar
FelixGriffin
2,680 Posts
Posted Jul 04, 2013
Replied 6 hours later
Don't try what LP said, it'll corrupt your map. NEVER put quote marks in any field in Hammer.
Avatar
CamBen
973 Posts
Posted Jul 04, 2013
Replied 2 hours later
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.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Sindri
3 Posts
Posted Jul 04, 2013
Replied 5 hours later
The game_ui works just as i want. The player picks up a remote and the game_ui kicks in. Thanks a lot.

Sindri