Func_throwobject commands
 
Specific commands for the func_throwobject entity. The func_throwobject also responds to many entity commands (gameX86 source code reference: object.cpp).

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


pickup  
 
Function
 
This makes an actor pick up an throwobject. The object will attach itself to the actor model's bone specified in the command argument.

Syntax
 
$<object_name> pickup $<actor_name> <bone_name>

Notes & examples
 
This command works exactly the same way as the attach Entity command. Refer to the notes of this command for more info on bones and examples on how to make an actor pick up a throwobject. The syntax is exactly the same for the attach and pickup commands.


throw
 
Function
 
This command makes a throwobject throw itself at another entity at the velocity and gravity ratio specified in the command arguments. The thrown object will inflict damage to the entity it's thrown at when it hits it.

Syntax
 
$<object_name> throw $<object_name> <velocity> $<target_entity> <gravity_ratio>

Notes & examples
 
Here's a breakdown of the command arguments:

$<object_name>:

<velocity>:

$<target_entity>:

<gravity_ratio>:

targetname of the throwobject.

speed at which the model will be thrown.

targetname of the entity at which the throwobject will thrown.

gravity pull on the thrown object. This determines how fast it will fall when thrown. Values are from 0.0 to 1.0: 0.0 is no gravity and 1.0 is normal gravity.

Here's an example on how to use this command:

Let's say you insert a func_throwobject in a map. Set the "model" key to "chair.def" and the "targetname" key to "chair1". You now have a office chair model that can be thrown at another entity. If you want to make it throw itself at the player, just use the command:

$chair1 throw $chair1 30 *1 1

The chair model will be thrown at the player (entity *1) at a speed of 30 and normal gravity.

Note:
A throwobject can also be thrown at another entity after it has been picked up by an actor with the pickup command or the attach Entity command. The object is thrown just the same as if it wasn't attached.