Es fire

From EventScripts Community Encyclopedia

Overview

Syntax: es_fire <userid> <classname or targetname> <input name> [optional parameter] [delay]

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xfire

Description

Cause a player to manipulate game entities. It works the same as Valve's "ent_fire" but you can force players to run it without cheats

Parameters

  • userid - Player that you wish to trigger the event
  • classname/targetname - Class or Target to trigger
  • input name - All entities have different input triggers
  • value - Value of input you wish to change
  • delay - Delay the action for x seconds


Examples

event player_spawn
{
  // set the player's personal gravity
  es_fire event_var(userid) !self addoutput "gravity 400"
}

The above example will set the player's gravity to 400 times the current server value. This is to say that the gravity is a multiplier value. If you wanted to set a player's gravity to half that of the server's then you would use 0.5 as the gravity value.


Notes

  • Parameters may not always be the same for every situation
  • Please note that Valve's entity message engine (which es_fire uses) does not resolve es_fire messages right away. These may require a gameframe or more before they finish. You may need to delay other commands that depend on the es_fire results such that they happen after es_fire messages are handled by Valve's entity manager.
  • This command is a wrapper around Valve's ent_fire command and can do just about everything it can. (See below for external links on ent_fire.)


See also

blog comments powered by Disqus