Please or Register to create posts and topics.

A problem with point_servercommand

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

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.

Falsi sumus crusto!
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

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. ;)

Anyways have a nice day

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

Don't try what LP said, it'll corrupt your map. NEVER put quote marks in any field in Hammer.

Falsi sumus crusto!

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.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

The game_ui works just as i want. The player picks up a remote and the game_ui kicks in. Thanks a lot.

Sindri