Sentient commands
 
These are the commands which control sentient entities: players and actors. Sentient entities are a superclass of player and actor and they also respond to many entity commands (gameX86 source code reference: sentient.cpp). Although in principle, players and actors will respond to these commands, they are more likely to be useful for fighting-capable actors for the most part.

Sentient entity commands are colored in gold in my custom SinScript syntax coloring wordfile for UltraEdit32.


ammo  
 
Function
 
This gives an actor ammo that can be looted from him when he dies. You have to specify the ammo type and amount in the command arguments. See notes below for a list of all the ammo type names.

Syntax
 
$<sentient_name> ammo <ammo_type> <amount>

Notes & examples
 
If you give ammo to the player with this command, the ammo can be spent if he has the weapon to fire it. You can also give the player ammo with the give Player command. If you give ammo to an actor with this command, the actor will not spend this ammo even he has the corresponding weapon.

When the actor dies, the type and amount of ammo you gave him can be looted from him in the usual way (standing over his body and pressing the use key). The player can only loot the ammo if he is currently carrying less the the maximum amount for that ammo type. Here is a list of all the ammo type names you can use as the command argument:

Ammo type name
Weapons which use this ammo
Max amount player can carry
Bullet10mm
Magnum pistol, Assault Rifle
500
Bullet50mm
High Velocity chaingun
500
BulletPulse
Pulse Rifle, Quantum Destabilizer
200
Rockets
Rocket Launcher, Grenade Launcher
100
Shotgunclip
Shotgun
50
BulletSniper
Sniper Rifle
20
Spears
Speargun
60
Spidermines
None - hand thrown
10

You can also take ammo away from a sentient with the take_ammo command.


armor  
 
Function
 
This gives an actor armor that can be looted from him when he dies. You have to specify the armor type and amount of armor points in the command arguments. See notes below for a list of all the armor type names.

Syntax
 
$<sentient_name> armor <armor_type> <number_of_points>

Notes & examples
 
If you give armor to the player with this command, the armor will eventually be depleted when he sustains damage. You can also give the player armor with the give Player command. If you give armor to an actor with this command, his armor will also get depleted even he sustains damage.

When the actor dies, the type and what is left of the amount of armor you gave him (after damage) can be looted from him in the usual way (standing over his body and pressing the use key). The player can only loot the armor if it's value is more than his current armor value. Here is a list of all the armor type names you can use as the command argument:

Armor type name
Part of body it protects
Max number of points player can get
RiotHelmet
Head
100
FlakJacket
Torso
100
FlakPants
Legs
100


Note:
There is a strange bug with this command which I cannot explain. The amount of armor you give the actor in the command argument is multiplied by 2 in the game. In order to work around this problem, give the actor only half the amount of armor you want him to have in the game. Also, don't forget that if he already has a certain amount of an armor type by default, the amount of armor you give him with this command will be cumulated to his default armor.


You can also take armor away from a sentient with the take_armor command.


dropweapon  
 
Function
 
This sets whether a weapon dropped by an actor will fall on the floor or not. An actor will drop his current weapon when he dies or is forced to drop it with the dropweaponnow command.

Syntax
 
$<sentient_name> dropweapon 0|1

Notes & examples
 
The command argument is a 0|1 toggle which turns this off or on.

0:
Turns option off. The actor's current weapon, when dropped, won't fall on the floor and thus won't be available for pickup.
1:
Turns option on. The actor's current weapon, when dropped, will fall on the floor and be available for pickup.


dropweaponnow  
 
Function
 
This forces an actor to drop his current weapon immediately.

Syntax
 
$<sentient_name> dropweaponnow

Notes & examples
 
If the dropweapon option was previously set to 1 for the actor, the weapon is removed from the actor's hands and falls on the floor (and thus available for pickup by the player). If the option was previously set to 0 for the actor, the weapon is removed from the actor's hands but doesn't fall on the floor.


fire  
 
Function
 
This puts an actor in manual firing mode and makes him fire a single shot from his current weapon.

Syntax
 
$<sentient_name> fire

Notes & examples
 
If the actor was previously told to switch weapons with the weapon_putaway and weapon commands, the weapon_ready must first be used to initialize the actor's new weapon before using fire commands. A weaponuse command also initializes an actor's weapon.

This command works in close relationship with the releasefire command which takes actors out of manual firing mode. Refer to the notes of that command for an example script on how these 2 commands should be used.


item  
 
Function
 
This gives an actor health or inventory items that can be looted from him when he dies. You have to specify the item name and amount in the command arguments. If the amount argument is omitted, a quantity of 1 is assumed. See notes below for a list of all the item names.

Syntax
 
$<sentient_name> item <item_name> <amount>

Notes & examples
 
If you give items to the player with this command, they will automatically be added to his inventory, health will be instantly cumulated to his total health points. You can also give the player items with the give Player command.

If you give health or inventory items to an actor with this command, those will become available to the player when the actor dies. The items can then be looted from him in the usual way (standing over his body and pressing the use key). Here is a list of all the item type names you can use as the command argument:

Item name
Description
Max amount player can get
health
Health points.
200
Blueprints
Construction blueprints
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

BlueCard
Blue security card
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

candybar
Candy bar
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

chemsuit
Yellow SinTek chemical worker suit
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

coin
Quarter
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

comlink
Remote communications device
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

cookies
Cookie bag

Note: does not generate a loot icon

No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

Decoder
Computer decoder
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

dollar
Dollar bill
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

envelope
Package envelope
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

evidence
Evidence envelope
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

genericpulsepart
Part 1, 2 or 3 of pulse rifle depending
on which one(s) player already has.
Note: does not generate a loot icon
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

GlowStick
Green fluorescent glowsticks
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

GreenCard
Green security card
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

Hand
Severed human hand
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

IdentCard
Identification card
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

keyring
Security door key
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

moneybag
Money bag from bank heist
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

OrangeCard
Orange security card
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

passcode
Silo launch abort passcode
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

pulsepart1
Pulse rifle part 1
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

pulsepart2
Pulse rifle part 2
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

pulsepart3
Pulse rifle part 3
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

silencer
Silencer for Magnum and Assault rifle
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

U4Sample
U4 sample from SinTek lab
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.

YellowCard
Yellow security card
No limit when items are given or looted.
If player picked one up previously, no
more can be given or looted.


You can also take items away from a sentient with the take_item command.


noshadow
 
Function
 
Prevents a model from casting a shadow in the game even if shadows are enabled in the game options menu.

Syntax
 
$<sentient_name> noshadow

Notes & examples
 

releasefire  
 
Function
 
This takes an actor out of manual firing mode and makes him end firing a single shot from his current weapon. The <time_delay> argument is required and tells the script how much time to wait before actually executing the command.

Syntax
 
$<sentient_name> releasefire <time_delay>

Notes & examples
 
This command is used right after the fire command which puts an actor in manual firing mode: this is what makes him fire the single shot from his weapon. The releasefire command makes him "stop" firing that shot and is required if you want to make the actor fire more shots with the fire command. Just think of releasefire as a "release the trigger" command.

Here's an example on how you can make an actor fire single shots on demand with these 2 commands. First insert a Monster_Thug_AssaultRifle actor in a map and name it "thug1". Next, write the following script:

$thug1 thread fire_3round_bursts waitForPlayer end

fire_3round_bursts:
local.self ignoreall
wait 3
local.self weapon_ready

fire_again:
local.self fire
local.self releasefire 0.2
wait 0.2
local.self fire
local.self releasefire 0.2
wait 0.2
local.self fire
local.self releasefire 0.2
wait 0.2
wait 3
goto fire_again
end


This script will make the thug ignore the player and fire 3 round bursts with his assault rifle once every 3 seconds. The time delay between each shot of the bursts is 0.2 seconds and this is the reason why a wait command is required after each releasefire command. The wait time must always be equal or greater than the releasefire time delay. Here's the exact chronology of events to make you better understand the "mechanics" of these commands:
  1. local.self fire : tells the thug to press the trigger to fire a single shot.
  2. local.self releasefire 0.2 : immediately after, this tells him to release the trigger in 0.2 seconds from now.
  3. wait 0.2 : immediately after that, this tells the script to wait 0.2 seconds before executing the next command so the previous command has enough time to be executed.
From there on, modifiying the time between shots is a simple matter of changing the releasefire time delay and wait value.


take_ammo  
 
Function
 
This takes ammo away from a player or actor. You have to specify the ammo type and amount in the command arguments.

Syntax
 
$<sentient_name> take_ammo <ammo_type> <amount>

Notes & examples
 
If you take ammo from the player with this command, he will end up with less to spend if he has the weapon to fire it. You can also take ammo from the player with the take Player command. If you take ammo from an actor with this command, the actor won't have less ammo to spend if he has the corresponding weapon (since actors have infinite ammo anyway), he will just have less ammo to loot from when he dies.

Sentients can be given ammo with the ammo command. For a complete list of all the ammo types, refer to the notes of that command.


take_armor  
 
Function
 
This takes armor away from a player or actor. You have to specify the armor type and number of points in the command arguments.

Syntax
 
$<sentient_name> take_armor <armor_type> <number_of_points>

Notes & examples
 
If you take armor from the player with this command, he will end up with less protection. You can also take armor from the player with the take Player command. If you take armor from an actor with this command, the actor will also have less protection (and thus, less hard to kill) and he will have less armor to loot from when he dies.

Sentients can be given armor with the armor command. For a complete list of all the armor types, refer to the notes of that command.


take_item  
 
Function
 
This takes items away from a player or actor. You have to specify the item name and amount in the command arguments. If the amount argument is omitted, a quantity of 1 is assumed.

Syntax
 
$<sentient_name> take_item <item_name> <amount>

Notes & examples
 
In order to take an item away from the player with this command, he must either have previously picked it up somewhere in the map or have previously been given the item with the item command or the give Player command. You can also take items from the player with the take Player command.

In order to take an item from an actor with this command, the actor must have previously been given the item with the item command. For a complete list of all the items, refer to the notes of that command.


take_weapon  
 
Function
 
This takes a weapon away from a player or actor. You have to specify the weapon name as the command argument.

Syntax
 
$<sentient_name> take_weapon <weapon_name>

Notes & examples
 
In order to take a weapon away from the player with this command, he must either have previously picked it up somewhere in the map or have previously been given the weapon with the weapon command or the give Player command. You can also take weapons from the player with the take Player command.

In order to take an weapon from an actor with this command, the actor must either already have this weapon by default or have previously been given the weapon with the weapon command. For a complete list of all the weapons, refer to the notes of that command.


weapon  
 
Function
 
This gives an actor a weapon that can be looted from him when he dies. You have to specify the weapon name as the command argument. See notes below for a list of all the weapon names.

Syntax
 
$<sentient_name> weapon <weapon_name>

Notes & examples
 
If you give a weapon to the player with this command, he will be able to use it if he has ammo for it. You can also give the player a weapon with the give Player command.

If you give a weapon to an actor with this command, one OR the other of the following 2 things will happen:
  • If the actor did not have a weapon when the command was issued, it will appear in his hands and he will be ready to use it right away. Giving a weapon to a civilian serves no purpose because they can't fight.
  • If the actor already had a weapon when the command was issued, it won't appear in his hands but will be part of his own "inventory" (the weapon can be looted from him if he dies). He will only switch to this new weapon on the next weaponuse command.
When the actor dies, by default, he will drop his current weapon which the player can pick up by walking over it. If the actor has other weapons in his inventory when he dies, (either his default weapon or weapons you gave him earlier), those can be looted from him in the usual way (standing over his body and pressing the use key). If the player already has any of those weapons, he will simply pick up the ammo left in the weapons. Here is a list of all the weapon names you can use as the command argument:

Weapon name
Description
Ammo type used by weapon
assaultrifle
Assault Rifle
Bullet10mm
chaingun
High Velocity chaingun + grenade launcher
Bullet50mm & Rockets
magnum
Magnum pistol
Bullet10mm
pulserifle
Pulse rifle
BulletPulse
quantumdestabilizer
Quantum Destabilizer
BulletPulse
rocketlauncher
Rocket Launcher
Rockets
shotgun
Shotgun
shotgunclip
sniperrifle
Sniper Rifle
BulletSniper
speargun
Spear Gun
Spears

You can also take a weapon away from a sentient with the take_weapon command.


weapon_putaway  
 
Function
 
This command prepares an actor which has more than one weapon for a weapon switch. It is used right before the weapon_ready command which does the actual switch to the actor's next available weapon.

Syntax
 
$<sentient_name> weapon_putaway

Notes & examples
 
If the command is issued right before giving an actor a new weapon with the weapon command, this will make him switch to his new weapon right away upon execution of the weapon command.


weapon_ready  
 
Function
 
This is used to initialize an actor's current weapon before using the manual firing mode commands: fire and releasefire. Also makes the actor's weapon play a reloading sound.

Syntax
 
$<sentient_name> weapon_ready

Notes & examples
 
This command is also useful to make actors switch weapons. For example, if the actor was previously given an extra weapon with the weapon command, by using the weapon_putaway command right before this command, the actor will switch to his next weapon.


weaponuse  
 
Function
 
This makes an actor use the current weapon which in fact makes it switch to its secondary mode of fire (when applicable). Also forces a weapon_ready so the weapon is ready to be fired in manual mode with the fire and releasefire commands.

Syntax
 
$<sentient_name> weaponuse

Notes & examples
 
The main purpose of this command is to make a weapon switch to its secondary mode of fire (when applicable) and back to its primary mode depending on which mode the weapon is currently in.

So if you have an actor which is currently armed with a High Velocity gun for example, the weaponuse command will make him switch to the Grenade Launcher which is the same weapon in secondary fire mode. Using the command again will make him switch back to the primary Chaingun mode.

The other 2 weapons which have secondary modes of fire are: the Pulse Rifle (mode1: plasma balls, mode2: lighting bolts) and the Sniper Rifle (mode2 is the Zoom In function which makes a peculiar sound).