Es effect energysplash

From EventScripts Community Encyclopedia


Overview

Syntax: es_effect energysplash <start-vector> <direction-vector> <explosive-bool>

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 energysplash

Description

Draws a quick energy effect at the origin flying in the direction specified.

Parameters

  • <start-vector> - the vector point of origin for the effect.
  • <direction-vector> - the vector for direction of the effect.
  • <explosive-bool> - 0/1 for FALSE/TRUE to include explosion with the effect.


Examples

When somebody kills someone, make a energysplash between them

event player_death
{	
	// Set vars
	es_set temp_x 0
  	es_set temp_y 0
  	es_set temp_z 0
  	es_set att_loc 0
  	es_set vic_loc 0
	es_set splash_vec 0
 
	// Get position of the victim
  	es_getplayerlocation temp_x temp_y temp_z event_var(userid)
  	es_createvectorstring vic_loc server_var(temp_x) server_var(temp_y) server_var(temp_z)
 
	// Get attacker position
  	es_getplayerlocation temp_x temp_y temp_z event_var(attacker)
  	es_createvectorstring att_loc server_var(temp_x) server_var(temp_y) server_var(temp_z)	
 
	// Create a vector between them
	es_createvectorfrompoints splash_vec server_var(att_loc) server_var(vic_loc)
 
	// Splash:             <start-vector>      <direction-vector>     <explosive-bool>
	es_effect energysplash server_var(att_loc) server_var(splash_vec) 0
}


Notes

  • ES can only reliably provide a subset of effects and these are shown to all players.
  • 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.


See also

blog comments powered by Disqus