{{tag>event command}} {{htmlmetatags>metatag-keywords=(pac3, wiki, event, command) metatag-description=(Triggers when a given command is used.) metatag-og:title=(Command | Event) metatag-og:description=(Triggers when a given command is used.) }} ====== Command ====== Triggers when a given command is used. This event is controlled through the pac_event console command. ===== Operator ===== Any **string** [[:part:event:#operators|operator]]. ===== Arguments ===== ^name^type^description^ |**{{anchor:time}}[[#time]]** | number | For how many seconds should the event be active after triggering. Default is 0.1 | |**{{anchor:find}}[[#find]]** | string | Command name, used together with the pac_event command. | ===== Usage & Examples ===== ==== Command Variations ==== These are the commands variation used to trigger command events. They can be used from the console, bound to a key or triggered with and [[:part:event]] combined with a [[:part:command]]. \\ | **ONCE** | pac_event [[#find]] | Triggers the event for a given amount of [[#time]]. | | **OFF** | pac_event [[#find]] 0 | Turns the event off. [[#Time]] specifies the delay before turning off. | | **ON** | pac_event [[#find]] 1 | Turns the event on. [[#Time]] doesn't seem to affect it. | | **TOGGLE** | pac_event [[#find]] 2 | Toggles the event. Time specifies the delay before turning off. | | **HOLD** | +pac_event [[#find]] 2 | Triggers the event for as long as you hold the button, time specifies the delay before turning off. | {{fa>fas fa-exclamation?color=#ffd54a&fw&lg}} [[#find]] - Replace this with whatever you typed in the [[#find]] argument field. \\ {{:part:event:command:command_event.jpg?direct|}} ==== Event Wheel ==== The event wheel provides quick access to all command events in your outfit. To access the event wheel open the console ~ and type bind //**key**// +pac_events --- //**key**// is the keyboard button that you want to use. From now on you can hold //**key**// and hover over an event to activate it. Names displayed on the wheel are based on the [[#find]] argument. To toggle events on the wheel set time to -1. ==== Key Binds ==== To bind the command to a key open your console ~ and type bind **//key//** //**command**//. Replace **//key//** with the key that you want and command with one of the [[#command-variations|commands]]. Example: bind x "pac_event my_command 2" ==== Command Part ==== Command events can be triggered from the [[:part:command]] part, to do so: - Add an event to your outfit that will trigger the command, usually this is a button event. - Add a [[:part:command]] part under the event, paste your [[#command-variations|command]] into the **string** field. {{fa>download?color=#7ab353&fw&lg}} **Download:** {{asset:example:event_command.txt}}