part:event:command

Command

Triggers when a given command is used. This event is used through the pac_event console command. It can be used from the console (~), bound to a key or used together with a Button event and the Command part.

Any string operator.

nametypedescription
time number For how many seconds should the event be active after triggering. Default is 0.1

find

string Command name, used together with the pac_event command.
pac_event find_argument Triggers the event for a given amount of time.
pac_event find_argument 0 Turns the event off. Time specifies the delay before turning off.
pac_event find_argument 1 Turns the event on. Time doesn't seem to affect it.
pac_event find_argument 2 Toggles the event. Time specifies the delay before turning off.
+pac_event find_argument Triggers the event for a given amount of time when you press a button AND when you let go.
+pac_event find_argument 2 Triggers the event for as long as you hold the button, time specifies the delay before turning off.

find_argument - Replace this with whatever you typed in the find argument field.

Method 1: Binding the command to a key

To bind the command to a key open your console (~) and type bind <key> “pac_event find_argument”.

Replace <key> with the key that you want and find_argument with whatever you typed in the find argument field.


Method 2: Using a Button event + Command part

If you don't want to bind any keys then:

  1. Add a Button event and set it to the key you want.
  2. Add a Command part under the Button, paste your command into the string field.

Examples

1) Bind: Set the event to command, operator to find simple, find to test. Open your console (~) and type bind x “pac_event test 2”. The event will toggle whenever you press X.


2) Button: Set the event to command, operator to find simple, find to test. Add a Button event and set it to X. Add a Command part under the Button and type pac_event test 2 into the string field. The event will toggle whenever you press X.

Download: event_command.txt


← Go back to Event

  • part/event/command.txt
  • Last modified: 10 months ago
  • by yagira