Func_launcher commands
 
Specific commands for the func_launcher entity. The func_launcher also responds to many entity commands (gameX86 source code reference: launcher.cpp).

Specific entity commands are colored in brown in my custom SinScript syntax coloring wordfile for UltraEdit32.


launch
 
Function
 
This makes the func_launcher entity launch a projectile.

Syntax
 
$<launcher_name> launch <projectile_type>

Notes & examples
 
The possible projectile types are:
  • spear : speargun harpoons
  • mine : spider mines
  • rocket : normal rocket launcher projectiles
  • shotrocket : guided missiles
  • drunkmissile : gray & red rocket

setXdir  
 
Function
 
This sets the pitch angle of the launched projectile's trajectory.

Syntax
 
$<launcher_name> setXdir <pitch_angle>

Notes & examples
 
The pitch angle corresponds to the elevation setting. A value of 0 is horizontal, a positive angle value is downwards and a negative value is upwards.


setXvar  
 
Function
 
This sets the pitch angle variance of the projectile when launched.

Syntax
 
$<launcher_name> setXvar <±pitch_angle>

Notes & examples
 
The pitch angle variance is the amount of possible angle variation from the nominal pitch angle value set by the last setXdir command. The actual amount of variance is applied on a random basis. Here's a practical example of how angle variance works:

Let's say you set the angle at 45 and the angle variance at 10. This means that the resulting trajectory angle of the launched projectiles can be anywhere from 35 (45 - 10) to 55 (45 + 10). Since the angle can vary at random from one launch to the next, this sets an innacuracy factor into the launcher. The higher the angle variance, the less accurate the launcher will be.


setYdir  
 
Function
 
This sets the yaw angle of the launched projectile's trajectory.

Syntax
 
$<launcher_name> setYdir <yaw_value>

Notes & examples
 
The yaw angle corresponds to the traverse setting. A value of 0 is center, a positive angle value is towards the left and a negative value is towards the right.


setYvar  
 
Function
 
This sets the yaw angle variance of the projectile when launched.

Syntax
 
$<launcher_name> setYvar <±yaw_angle>

Notes & examples
 
The yaw angle variance is the amount of possible angle variation from the nominal yaw angle value set by the last setYdir command. The actual amount of variance is applied on a random basis. Here's a practical example of how angle variance works:

Let's say you set the angle at 45 and the angle variance at 10. This means that the resulting trajectory angle of the launched projectiles can be anywhere from 35 (45 - 10) to 55 (45 + 10). Since the angle can vary at random from one launch to the next, this sets an innacuracy factor into the launcher. The higher the angle variance, the less accurate the launcher will be.


setZdir  
 
Function
 
This sets the roll angle of the launched projectile.

Syntax
 
$<launcher_name> setZdir <roll_angle>

Notes & examples
 
The roll angle of the projectile determines it's orientation while in flight. A value of 0 makes it fly flat, a positive value makes it fly sideways towards the right and a negative value makes it fly sideways towards the left.


setZvar  
 
Function
 
This sets the roll angle variance of the projectile when launched.

Syntax
 
$<launcher_name> setZvar <±roll_angle>

Notes & examples
 
The roll angle variance is the amount of possible angle variation from the nominal roll angle value set by the last setZdir command. The actual amount of variance is applied on a random basis. Here's a practical example of how angle variance works:

Let's say you set the angle at 0 and the angle variance at 10. This means that the resulting roll orientation of the launched projectiles can be anywhere from -10 (0 - 10) to 10 (0 + 10). Since the angle can vary at random from one launch to the next, this sets an innacuracy factor into the launcher. The higher the angle variance, the less accurate the launcher will be.