From EventScripts Community Encyclopedia
|
Overview
Syntax:
es_effect beam
<start-vector> <end-vector> <model-index> <halo-model-index> <framestart> <framerate> <seconds> <width> <endWidth> <fadeLength> <noise> <red> <green> <blue> <brightness> <speed>
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_xeffect
Description
Draws a straight beam from start-vector to end-vector.
Parameters
- <start-vector> - the vector point of origin for the effect.
- <end-vector> - the vector point of destination for the effect.
- <model-index> - index of model provided by es_precachemodel.
- <halo-model-index> - index of halo model provided by es_precachemodel.
- <framestart> - Usually 0
- <framerate> - Framerate of the animation
- <seconds> - duration in seconds of how long the effect will be displayed.
- <width> - width of the effect at its origin.
- <endWidth> - width of effect at its destination.
- <fadeLength> - Time in seconds for fadeout
- <noise> - Coefficent for noiselevel, 0 for silent
- <red> - 0-255 amount of red to add to the effect.
- <green> - 0-255 amount of green to add to the effect.
- <blue> - 0-255 amount of blue to add to the effect.
- <brightness> - determines how bright the effect will be.
- <speed> - determines how fast the effect will travel.
Examples
event player_hurt
{
es_xset x1 0
es_xset y1 0
es_xset z1 0
es_xset v2 0
es_xcreatevectorstring v2 0 0 0
es_xset v1 0
es_getplayerlocation x1 y1 z1 event_var(userid)
es_createvectorstring v1 server_var(x1) server_var(y1) server_var(z1)
es_xset model1 0
es_xprecachemodel model1 "sprites/crystal_beam1.vmt"
es_effect beam server_var(v1) server_var(v2) server_var(model1) server_var(model1) 0 0 10 10 10 0 1 255 255 255 255 30
}
Notes
- ES can only reliably provide a subset of effects and these are shown to all players.
- All model indexes are obtained through the use of the new return value from es_precachemodel.
- All points/vectors use the vector-string syntax of es_createvectorstring.
- This command is still experimental and may have its syntax changed eventually.
- This command was introduced in EventScripts version 1.5.
- There is a limit of 64 beams at a time.
See also
|
|