<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.oni2.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sdm</id>
	<title>OniGalore - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.oni2.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sdm"/>
	<link rel="alternate" type="text/html" href="https://wiki.oni2.net/Special:Contributions/Sdm"/>
	<updated>2026-04-28T06:08:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.oni2.net/w/index.php?title=BSL:Functions&amp;diff=24001</id>
		<title>BSL:Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.oni2.net/w/index.php?title=BSL:Functions&amp;diff=24001"/>
		<updated>2015-01-26T16:06:34Z</updated>

		<summary type="html">&lt;p&gt;Sdm: /* cutscene */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{update}}&lt;br /&gt;
{{TOCfloat}}&lt;br /&gt;
==Signature==&lt;br /&gt;
===Arguments===&lt;br /&gt;
Put usage of brackets and commas here. Also tell about the weak syntax (with space as a separator).&lt;br /&gt;
===Return value===&lt;br /&gt;
When used alone forces the exit from a function. When used with a variable it forces the exit from a function and returns that variable.&lt;br /&gt;
&lt;br /&gt;
Example (1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
func void spawnUs () {&lt;br /&gt;
     ai2_spawn(Muro);&lt;br /&gt;
     sleep(200);&lt;br /&gt;
     return;&lt;br /&gt;
     ai2_spawn(Barabas);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the code &amp;lt;tt&amp;gt;ai2_spawn(Barabas);&amp;lt;/tt&amp;gt; is never executed.&lt;br /&gt;
&lt;br /&gt;
Example (2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var int current_char_id=0;&lt;br /&gt;
&lt;br /&gt;
func int spawnCharacter (string char_name) {&lt;br /&gt;
     ai2_spawn(char_name);&lt;br /&gt;
     current_char_id=current_char_id+1;&lt;br /&gt;
     return current_char;&lt;br /&gt;
     dmsg(&amp;quot;Hello.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the current_char is returned from the function (notice the int declaration at the begin of function, which declares the type to return). &amp;lt;tt&amp;gt;dmsg(&amp;quot;Hello.&amp;quot;);&amp;lt;/tt&amp;gt; is never executed.&lt;br /&gt;
&lt;br /&gt;
==Declaration==&lt;br /&gt;
Put usage of &amp;lt;tt&amp;gt;func&amp;lt;/tt&amp;gt; here.&lt;br /&gt;
: [...]&lt;br /&gt;
* Tips:&lt;br /&gt;
** If you call a second function from inside another function, the second function will be executed til its end and then the rest of the first function gets executed.&lt;br /&gt;
** You can call a function recursively, but only up to about four times, then the script execution stucks for some reason (maybe intentional to prevent endless loops?).&lt;br /&gt;
** BSL doesn&#039;t allow function name overriding even if the parameters are different (in java you can for example).&lt;br /&gt;
** Seems there is a limit of 8 parameters for each function.&lt;br /&gt;
&amp;lt;br=&amp;quot;clear all&amp;quot;&amp;gt;&lt;br /&gt;
==Multithreading==&lt;br /&gt;
Put usage of &amp;lt;tt&amp;gt;fork&amp;lt;/tt&amp;gt; here.&lt;br /&gt;
: [...]&lt;br /&gt;
* Tips:&lt;br /&gt;
** Use &amp;quot;fork&amp;quot; in conjunction with &amp;quot;sleep&amp;quot; to ensure that there is always only one running copy of the function. (Themselves looping functions without sleep can crash the game.)&lt;br /&gt;
** And remember to design the code so it cannot create two copies of the function running in parallel. When that happens, the desired loop effect is usually broken and &amp;quot;echos&amp;quot; start to apprear.&lt;br /&gt;
==chr_index==&lt;br /&gt;
&amp;lt;tt&amp;gt;chr_index&amp;lt;/tt&amp;gt; is a variable required by some functions like &amp;lt;tt&amp;gt;chr_focus&amp;lt;/tt&amp;gt;. This variable hold a ID for a character and each character have a &amp;lt;tt&amp;gt;chr_index&amp;lt;/tt&amp;gt; associated.&lt;br /&gt;
&lt;br /&gt;
Normally the chr_index is associated by the order of the spawn of the characters. The characters can be spawned either by scripting or by the engine itself (if it doesn&#039;t have &amp;lt;tt&amp;gt;NotInitiallyPresent&amp;lt;/tt&amp;gt; flag at &amp;lt;tt&amp;gt;BINACJBOCharacter&amp;lt;/tt&amp;gt; file).&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ai2_spawn Muro&lt;br /&gt;
ai2_spawn Mukade&lt;br /&gt;
ai2_spawn Bomber&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the follow code Muro will receive the index 1, Mukade index 2 and Bomber index 3. Konoko always have a &amp;lt;tt&amp;gt;chr_index&amp;lt;/tt&amp;gt; of 0, because it&#039;s always the first character to be spawned.&lt;br /&gt;
&lt;br /&gt;
This ok, but there&#039;s an exception. Once a character is deleted, either by &amp;lt;u&amp;gt;be killed&amp;lt;/u&amp;gt; (and the engine delete it automatically) or by &amp;lt;u&amp;gt;calling &amp;lt;tt&amp;gt;chr_delete&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt; directly the following characters to be spawned will fill the holes left by the deleted.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ai2_spawn Muro&lt;br /&gt;
ai2_spawn Mukade&lt;br /&gt;
chr_delete Mukade&lt;br /&gt;
ai2_spawn Bomber&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example Mukade have the index 2, but once it&#039;s deleted (in this case directly by &amp;lt;tt&amp;gt;chr_delete&amp;lt;/tt&amp;gt; function) there will be hole where his id were. When Bomber is spawned, it isn&#039;t associated the index 3, but it will be associated the index 2, to fill the hole left behind.&lt;br /&gt;
&lt;br /&gt;
Seems the &amp;lt;tt&amp;gt;chr_index&amp;lt;/tt&amp;gt; variables make part of an array in memory, once some variable in the array is cleared, in the next opportunity it is filled up again.&lt;br /&gt;
&lt;br /&gt;
If you want to reset &amp;lt;tt&amp;gt;chr_index&amp;lt;/tt&amp;gt; you may want to use &amp;lt;tt&amp;gt;ai2_reset&amp;lt;/tt&amp;gt;, which resets all characters to level initial state (take a look at &amp;lt;tt&amp;gt;ai2_reset&amp;lt;/tt&amp;gt; implications before using it [http://wiki.oni2.net/BSL:Functions#ai2 here]).&lt;br /&gt;
&lt;br /&gt;
==Native functions==&lt;br /&gt;
Line structure:	script command [parameter] - description - example &lt;br /&gt;
&lt;br /&gt;
Parameter:	&lt;br /&gt;
*parameter&lt;br /&gt;
:you have to use this parameter&lt;br /&gt;
*[parameter]&lt;br /&gt;
:IMO, this parameter is an option. You can use it or not.&lt;br /&gt;
*(null)&lt;br /&gt;
:type only the script command, nothing else&lt;br /&gt;
*no parameter given&lt;br /&gt;
:type the script command and add &amp;quot;= 0&amp;quot; or &amp;quot;= 1&amp;quot; (sometimes you can add higher numbers, e.g. cm_distance = 200)&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;Commands in this color are Windows-only&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;Commands in this color are Mac-only&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ai2===&lt;br /&gt;
&#039;&#039;&#039;Commands which can have an effect on all AIs (see below to use these same commands on one AI):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*ai2_allpassive passive:int {0 | 1} - stops all AIs from thinking for themselves - ai2_allpassive 1&lt;br /&gt;
*ai2_spawnall (null) - spawns all AI, even those not initially present - ai2_spawnall&lt;br /&gt;
*ai2_takecontrol on_off:int {0 | 1} - makes the AI movement system take control of the player - ai2_takecontrol 1&lt;br /&gt;
*ai2_kill [int] - kills all AIs, just use a number as parameter instead of a string&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commands which have an effect on one AI:&#039;&#039;&#039;&lt;br /&gt;
*ai2_active [ai_name:string | script_id:int] - forces an AI into active mode&lt;br /&gt;
*ai2_attack [ai_name:string | script_id:int] [target_name:string | target_script_id:int] - forces an AI to attack another character - ai2_attack IntroNinja 0&lt;br /&gt;
*ai2_barabbas_retrievegun [ai_name:string | script_id:int] - makes barabbas retrieve his gun if it is lost - ai2_barabbas_retrievegun barabus&lt;br /&gt;
*ai2_chump (null) - creates a chump&lt;br /&gt;
*ai2_comehere [ai_name:string | script_id:int] - tells an AI to come to the player&lt;br /&gt;
*ai2_debug_makesound [sound_type:string | ] [volume:float | ] - causes the player to make a sound (alerts nearby AIs)&lt;br /&gt;
*ai2_doalarm [ai_name:string | script_id:int] [console_id:int] - tells an AI to run for an alarm - ai2_doalarm ambush_commguy_2 4&lt;br /&gt;
&#039;&#039;if the AI is passive, ai2_doalarm cannot be executed&#039;&#039;&lt;br /&gt;
*ai2_dopath [ai_name:string | script_id:int] path_name:string - tells an AI to run a particular path - ai2_dopath A_E3 patrol_49&lt;br /&gt;
&#039;&#039;if the AI is passive, ai2_dopath cannot be executed&#039;&#039;&lt;br /&gt;
*ai2_findconnections [distance:int | ] - finds all BNV connections from the player&#039;s location&lt;br /&gt;
*ai2_followme [ai_name:string | script_id:int] - tells an AI to follow the player - ai2_followme s2_t05&lt;br /&gt;
*ai2_forget [ai_name:string | script_id:int] [forget_char:string] - makes one or all AIs forget they saw anything - ai2_forget Sec_Ambush_BOL_1&lt;br /&gt;
*ai2_idle [ai_name:string | script_id:int] - tells an AI to become idle - ai2_idle A1_intro01&lt;br /&gt;
*ai2_inactive [ai_name:string | script_id:int] - forces an AI into inactive mode&lt;br /&gt;
*ai2_kill [param1:string] [param2:string] - kills one or more AIs - ai2_kill ScanKerr01 // ai2_kill&lt;br /&gt;
*ai2_lookatchar [ai_name:string | script_id:int] [ai_name:string | script_id:int] - tells an AI to look at a character - ai2_lookatchar 0 Barabus&lt;br /&gt;
&#039;&#039;needs ai2_takecontrol 1 if Konoko should do that&#039;&#039;&lt;br /&gt;
*ai2_lookatme [ai_name:string | script_id:int] - tells an AI to look at the player - ai2_lookatme s2_t05&lt;br /&gt;
*ai2_makeaware [ai_name:string | script_id:int] [target_name:string | target_script_id:int] - makes an AI aware of another character - ai2_makeaware GrifElite04 char_0&lt;br /&gt;
*ai2_makeblind [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI blind - ai2_makeblind ShinShin 1&lt;br /&gt;
*ai2_makedeaf [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI deaf - ai2_makedeaf ShinShin 1&lt;br /&gt;
*ai2_makeignoreplayer [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI ignore the player - ai2_makeignoreplayer ParkStriker 1&lt;br /&gt;
*ai2_movetoflag [ai_name:string | script_id:int] flag_id:int [setfacing:string{&amp;quot;setfacing&amp;quot;}] - tells an AI to move to a flag - ai2_movetoflag 0 1091&lt;br /&gt;
&#039;&#039;needs ai2_takecontrol 1 if Konoko should do that&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;ai2_movetoflag will only work if there is a path to that flag&#039;&#039;&lt;br /&gt;
*ai2_neutralbehavior [ai_name:string | script_id:int] behavior:string - sets up an AI&#039;s neutral-interaction - ai2_neutralbehavior neutral_3 none&lt;br /&gt;
*ai2_noncombatant [ai_name:string | script_id:int] non_combatant:int{0 | 1} - sets or clears an AI&#039;s non-combatant state - ai2_noncombatant A1_intro01 1&lt;br /&gt;
*ai2_panic [ai_name:string | script_id:int] timer:int - makes an AI panic or not panic - ai2_panic A1_s_red02 300&lt;br /&gt;
&#039;&#039;I&#039;ve tried ai2_panic A1_s_red02 300 ==&amp;gt; Oni crashed&#039;&#039;&lt;br /&gt;
*ai2_pathdebugsquare x:int y:int - selects a path square in the player&#039;s BNV for debugging&lt;br /&gt;
*ai2_passive [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself - ai2_passive Intro_Striker_4 1&lt;br /&gt;
*ai2_report [ai_name:string | script_id:int | ] - tells an AI to report in&lt;br /&gt;
*ai2_report_verbose [ai_name:string | script_id:int | ] - tells an AI to report in verbosely&lt;br /&gt;
*ai2_reset [reset_player:int] - resets AI as if start of level - ai2_reset&lt;br /&gt;
&#039;&#039;resets consoles and clears characters as if you started the level again&#039;&#039;&lt;br /&gt;
*ai2_set_handlesilenterror handle_silent:bool [subsystem:string | ] - sets whether handled errors are silent&lt;br /&gt;
*ai2_set_logerror error_level:string [subsystem:string | ] - sets the level of errors to log to file&lt;br /&gt;
*ai2_set_reporterror error_level:string [subsystem:string | ] - sets the level of errors to report at console&lt;br /&gt;
*ai2_setalert [ai_name:string | script_id:int] alert:string - sets the alert state of an AI - ai2_setalert Floor2_Striker_2 high (alert strings: lull, low, medium, high, combat)&lt;br /&gt;
*ai2_setjobstate [ai_name:string | script_id:int] - tells an AI to take its current state as its job - ai2_setjobstate E_Er34&lt;br /&gt;
&#039;&#039;if the AI is passive, ai2_setjobstate cannot be executed&#039;&#039;&lt;br /&gt;
*ai2_setmovementmode [ai_name:string | script_id:int] mode:string - sets an AI&#039;s current movement mode - ai2_setmovementmode finalam_striker_1 walk  (movement mode strings: creep, walk, walk_noaim, run, run_noaim)&lt;br /&gt;
&#039;&#039;needs ai2_takecontrol 1 if Konoko should do that&#039;&#039;&lt;br /&gt;
*ai2_showmem - shows AI memory usage&lt;br /&gt;
*ai2_skill_bestangle best_angle:float - sets an AI&#039;s best aiming angle in degrees&lt;br /&gt;
*ai2_skill_decay decay_amount:float - sets an AI&#039;s grouping decay&lt;br /&gt;
*ai2_skill_delaymax maxdelay:int - sets an AI&#039;s max delay between shots, in frames&lt;br /&gt;
*ai2_skill_delaymin mindelay:int - sets an AI&#039;s min delay between shots, in frames&lt;br /&gt;
*ai2_skill_error error_amount:float - sets an AI&#039;s grouping error&lt;br /&gt;
*ai2_skill_inaccuracy inaccuracy:float - sets an AI&#039;s shooting inaccuracy multiplier&lt;br /&gt;
*ai2_skill_recoil recoil_compensation:float - sets an AI&#039;s recoil compensation amount (0-1)&lt;br /&gt;
*ai2_skill_revert - reverts the shooting skill being edited to the saved copy&lt;br /&gt;
*ai2_skill_save - saves the shooting skill being edited out as a text file&lt;br /&gt;
*ai2_skill_select char_class:string weapon_name:string - selects a shooting skill to edit&lt;br /&gt;
*ai2_skill_show - shows the currently selected shooting skill&lt;br /&gt;
*ai2_spawn ai_name:string [force_spawn:string{&amp;quot;force&amp;quot;}] - creates and starts an AI from a character object - ai2_spawn ambush_striker_2&lt;br /&gt;
*ai2_tripalarm - alarm_id:int [ai_name:string | script_id:int] - trips an alarm - ai2_tripalarm 2 0&lt;br /&gt;
&lt;br /&gt;
===chr===&lt;br /&gt;
&#039;&#039;&#039;Commands which have an effect on all characters:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*chr_kill_all_ai (null) - kills all the AI (not working?)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commands which have an effect on one character:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*chr_animate [ai_name:string | script_id:int] anim_name:string [num_frames:int] [interp_frames:int] - plays an animation on a character - chr_animate 0 KONOKOcycle_ride 500&lt;br /&gt;
*chr_animate_block [ai_name:string | script_id:int] anim_name:string [num_frames:int] [interp_frames:int] - plays an animation on a character and blocks until done - chr_animate_block 0 KONOKOlev11_cnsl_idle 300&lt;br /&gt;
*chr_boss_shield [ai_name:string | script_id:int] - turns on the boss shield for a character - chr_boss_shield OutroNinja&lt;br /&gt;
*chr_changeteam [ai_name:string | script_id:int] team_name:string - changes a character&#039;s team - chr_changeteam guard1 Syndicate&lt;br /&gt;
&#039;&#039;team name strings: Konoko, TCTF, Syndicate, Neutral, SecurityGuard, RogueKonoko, Switzerland, SyndicateAccessory&#039;&#039;&lt;br /&gt;
*chr_create script_id:int [start_create:string {&amp;quot;start&amp;quot;} | ] - creates a character from an ID of the AISA file - chr_create 1050 start&lt;br /&gt;
*chr_death_lock [ai_name:string | script_id:int] [on_off:int{0 | 1}] - this character will not die too much - chr_death_lock dum_hit_flash 1&lt;br /&gt;
*chr_delete [ai_name:string | script_id:int] - deletes a character - chr_delete liliput_striker_1&lt;br /&gt;
*chr_disarm chr_index:int - disarms a character or everyone&lt;br /&gt;
*chr_display_combat_stats chr_index:int - displays the characters combat stats&lt;br /&gt;
*chr_dontaim [ai_name:string | script_id:int] on_off:int{0 | 1} - disables the weapon variant for a character&lt;br /&gt;
*chr_draw_dot - draws a dot at a specified location&lt;br /&gt;
*chr_envanim [ai_name:string | script_id:int] anim:string [norotation:string{&amp;quot;norotation&amp;quot;} | ] - plays an environment animation on a character - chr_envanim 111 OutroNinjaBox01 norotation&lt;br /&gt;
*chr_envanim_block [ai_name:string | script_id:int] anim:string [norotation:string{&amp;quot;norotation&amp;quot;}] - plays an environment animation on a character and blocks - chr_envanim_block 110 OutroNinjaBox01 norotation&lt;br /&gt;
*chr_envanim_stop [ai_name:string | script_id:int] - stops any environment animation on a character - chr_envanim_stop IntroNinja&lt;br /&gt;
*chr_facetoflag [ai_name:string | script_id:int] flag_id:int - snaps a character&#039;s facing to a flag&#039;s facing - chr_facetoflag IntroNinja 600&lt;br /&gt;
*chr_focus chr_index:int - Selects what character to control - chr_focus 1&lt;br /&gt;
*chr_forceholster [ai_name:string | script_id:int] holster:int{0 | 1} [force_draw:int{0 | 1}] - forces a character to holster their weapon - chr_forceholster IntroStriker02 1&lt;br /&gt;
*chr_freeze [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself -chr_freeze A1_intro01 1&lt;br /&gt;
&#039;&#039;[ai_name:string | script_id:int] = 0 don&#039;t work&#039;&#039;&lt;br /&gt;
*chr_full_health [ai_name:string | script_id:int] - sets a characters health to full by script id - chr_full_health 0&lt;br /&gt;
*chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup -chr_givepowerup 0 ammo 1&lt;br /&gt;
&#039;&#039;powerup strings: ammo, cell, hypo, shield (in percent), invis (invisibility in frames, -1 = forever), lsi (amount is ignored)&#039;&#039;&lt;br /&gt;
*chr_giveweapon [ai_name:string | script_id:int] weapon_name:string - gives a character a new weapon - chr_giveweapon 0 w1_tap&lt;br /&gt;
&#039;&#039;weapon strings: w1_tap, w2_sap, w3_phr, w4_psm, w5_sbg, w6_vdg, w7_scc, w8_mbo, w9_scr, w10_sni, w11_ba1, w12_ba2&#039;&#039;&lt;br /&gt;
*chr_has_empty_weapon [ai_name:string | script_id:int] - returns if this character is holding a weapon that is empty - chr_has_empty_weapon(char_0)&lt;br /&gt;
&#039;&#039;This function only returns if the player is out of ammo for the weapon and the weapon is also empty.&#039;&#039;&lt;br /&gt;
*chr_has_lsi [ai_name:string | script_id:int] - records that the character has the lsi - chr_has_lsi(0)&lt;br /&gt;
*chr_health chr_index:int [hit_points:int] - sets character&#039;s health  - chr_health 0 300&lt;br /&gt;
*chr_holdkey [ai_name:string | script_id:int] key_name:string num_frames:int - forces a character to hold a key down for some frames&lt;br /&gt;
*chr_inv_reset [ai_name:string | script_id:int] - clears a characters inventory - chr_inv_reset ambush_tanker_1a&lt;br /&gt;
*chr_invincible [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character invincible - chr_invincible char_0 1&lt;br /&gt;
*chr_is_player [ai_name:string | script_id:int] - returns if this character is the player - chr_is_player(character)&lt;br /&gt;
*chr_location chr_index:int [loc_x:float loc_y:float loc_z:float] - Sets the location of any character -chr_location 0 100 100 100&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;&#039;&#039;The first parameter is [ai_name:string | chr_index:int] on Macs, that is, you can supply the name of the AI or its index number.&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
*chr_location_settocamera chr_index:int - Sets the location of any character to the camera location -chr_location_settocamera 1&lt;br /&gt;
*chr_lock_active [ai_name:string | script_id:int] - locks the character active - chr_lock_active IntroMuro&lt;br /&gt;
*chr_main_class [class_name:string | class_index:int] - sets the main characters class - chr_main_class striker_easy_1&lt;br /&gt;
&#039;&#039;This seems to be different from chr_set_class (besides the parameters). For example with chr_main_class(ninja_hard_1) your ninja will be right handed while with chr_set_class(0,ninja_hard_1) your ninja will be left handed.&#039;&#039;&lt;br /&gt;
*chr_neutral [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself - chr_neutral ParkStriker 1&lt;br /&gt;
*chr_nocollision [ai_name:string | script_id:int] on_off:int{0 | 1} - disables collision for a character - chr_nocollision 0 1&lt;br /&gt;
*chr_pain [ai_name:string | script_id:int] pain_type:string - forces a character to play a pain sound &#039;&#039;pain type strings: light, medium, heavy, death&#039;&#039;&lt;br /&gt;
*chr_peace [ai_name:string | script_id:int] - turns off fight mode - chr_peace 0&lt;br /&gt;
&#039;&#039;Normally used in cutscenes so the player leaves the fighting pose.&#039;&#039;&lt;br /&gt;
*chr_playback [ai_name:string | script_id:int] film_name:string [mode:string{&amp;quot;fromhere&amp;quot; | &amp;quot;interp&amp;quot;}] [num_frames:int] - plays back a film&lt;br /&gt;
*chr_playback_block [ai_name:string | script_id:int] film_name:string [mode:string{&amp;quot;fromhere&amp;quot; | &amp;quot;interp&amp;quot;}] [num_frames:int] - plays back a film and blocks until complete&lt;br /&gt;
*chr_playback_debug film_name:string - dumps stats for a playback film&lt;br /&gt;
*chr_poison [ai_name:string | script_id:int] damage:int interval:int [initial_interval:int] - slowly poisons a character - chr_poison (konoko, 10, 60, 90);&lt;br /&gt;
&#039;&#039;This is intended to be called in a continuous stream for a character standing in a trigger volume which represents an area that does ambient damage, such as a fire. No damage is done for the first &amp;quot;initial_interval&amp;quot; frames that the function is called, or, when &amp;quot;initial_interval&amp;quot; is not supplied, for the first &amp;quot;interval&amp;quot; frames; and then additional damage is only done once every &amp;quot;interval&amp;quot; frames as the function continues to be called every frame by the TV. Thus, calling this function a single time directly from a script will have zero effect.&#039;&#039;&lt;br /&gt;
*chr_set_class chr_index:int [class_name:string | class_index:int] - sets the character class of a specific character, class must exist otherwise the game crashes - chr_set_class 0 striker_easy_1&lt;br /&gt;
*chr_set_health [ai_name:string | script_id:int] hit_points:int - sets a characters health by script id - chr_set_health dum_hit_flash 50&lt;br /&gt;
*chr_shadow [ai_name:string | script_id:int] [on_off:int{0 | 1}] - turns of the shadow for this character - chr_shadow ZomShin 1&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;chr_showextent [anim_name:string] - shows the attack extent of an animation - chr_showextent KONOKOjump_bk_kick&amp;lt;/span&amp;gt;&lt;br /&gt;
&#039;&#039;chr_showextent_globals must be on for this to work.&#039;&#039;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;chr_showextent_globals - shows the global parts of an attack animation&#039;s extent - chr_showextent 1&amp;lt;/span&amp;gt;&lt;br /&gt;
*chr_super [ai_name:string | script_id:int] super_amount:float - set&#039;s a character&#039;s super value - chr_super 0 1&lt;br /&gt;
*chr_talk [ai_name:string | script_id:int] sound_name:string pre_pause:int post_pause:int [priority:string | ] - causes a character to play a line of dialogue - chr_talk victim_mansci_1 c02_62_11sci 0 0&lt;br /&gt;
*chr_teleport [ai_name:string | script_id:int] flag_id:int - teleports a character to a flag - chr_teleport 0 105&lt;br /&gt;
*chr_ultra_mode [ai_name:string | script_id:int] [on_off:int{0 | 1}] - enables ultra mode for a character&lt;br /&gt;
*chr_unkillable [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character unkillable - chr_unkillable A1_intro01 1&lt;br /&gt;
*chr_unlock_active [ai_name:string | script_id:int] - unlocks the character active&lt;br /&gt;
*chr_unstoppable [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character unstoppable - chr_unstoppable IntroMuro 1&lt;br /&gt;
*chr_vocalize [ai_name:string | script_id:int] type:string - makes a character utter a vocalization (vocalize type strings: override, yell, pain, call, say, chatter, idle)&lt;br /&gt;
*chr_wait_animation [ai_name:string | script_id:int] [anim_name:string]  - waits for a character to play a specific animation - chr_wait_animation 0 KONSPRrun_lt KONSPRrun_rt&lt;br /&gt;
*chr_wait_animstate [ai_name:string | script_id:int] [anim_name:string] - waits for a character to reach a specific animation state - chr_wait_animstate 0 run_slide&lt;br /&gt;
*chr_wait_animtype [ai_name:string | script_id:int] [anim_name:string] - waits for a character to play a specific animation type - chr_wait_animtype 0 jump&lt;br /&gt;
*chr_wait_health [ai_name:string | script_id:int] health_amount:float - waits until a character&#039;s health falls below a value - chr_wait_health Muro 200&lt;br /&gt;
*chr_weapon chr_index:int [weapon_name:string | weapon_num:int] - sets the weapon for a give character&lt;br /&gt;
*chr_weapon_immune [ai_name:string | script_id:int] - makes a character weapon immune - chr_weapon_immune(vat_bot_1); // chr_weapon_immune 0&lt;br /&gt;
*chr_who - lists all the players&lt;br /&gt;
*where [ai_name:string | script_id:int | ] - prints location of a character&lt;br /&gt;
*who - prints AIs that are nearby&lt;br /&gt;
&lt;br /&gt;
===cinematic===&lt;br /&gt;
[[Image:Cinematic_flags.jpg|thumb|right|This picture shows the layout of the &amp;quot;flags&amp;quot; used by cinematic_start/stop&#039;s start:int and end parameters.]]&lt;br /&gt;
*cinematic_start bitmap_name:string draw_width:int draw_height:int start:int end:int velocity:float mirror:bool - start the display of a cinematic insert - cinematic_start (MUROtalking, 180, 180, 15, 1, 15, false)&lt;br /&gt;
*cinematic_stop bitmap_name:string end:int velocity:float - stop the display of a cinematic insert - cinematic_stop (KONtalkangryfront, 16, 20)&lt;br /&gt;
&#039;&#039;see picture on right for locations that insert can be placed; if you give a flag value of 0, the picture is displayed in the top-left corner of the screen&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;the yellow area&#039;s flags are off-screen; these are used for the start position of the fly-in so the picture slides on-screen instead of popping up on-screen&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===camera===&lt;br /&gt;
*cm_anim cam_spec:string{&amp;quot;move&amp;quot; | &amp;quot;look&amp;quot; | &amp;quot;both&amp;quot;} anim_name:string - initiates a camera animation - cm_anim both OutroCam03&lt;br /&gt;
*cm_anim_block cam_spec:string{&amp;quot;move&amp;quot; | &amp;quot;look&amp;quot; | &amp;quot;both&amp;quot;} anim_name:string - initiates a camera animation - cm_anim_block both OutroCam04&lt;br /&gt;
*cm_barabus [ai_name:string | script_id:int] away:float up:float time:int - special camera for barabus&lt;br /&gt;
*cm_detach (null) - detaches the camera - cm_detach&lt;br /&gt;
*cm_interpolate cam_name:string num_frames:int - initiates a camera interpolation - cm_interpolate GrifCam01 180&lt;br /&gt;
*cm_interpolate_block anim_name:string num_frames:int - initiates a camera interpolation - cm_interpolate_block OutroCam05 180&lt;br /&gt;
*cm_jello mode:int {0 | 1} - toggles camera Jello(tm) mode - cm_jello 1&lt;br /&gt;
&#039;&#039;if cm_jello 0, the walls aren&#039;t transparent any longer&#039;&#039;&lt;br /&gt;
*cm_orbit speed:float [stopangle:float] - puts the camera in orbit mode - cm_orbit .1&lt;br /&gt;
*cm_orbit_block speed:float [stopangle:float] - puts the camera in orbit mode - cm_orbit_block 2 180&lt;br /&gt;
*cm_reset [maxspeed:float] [maxFocalAccel:float] - resets the camera - cm_reset&lt;br /&gt;
*cm_wait (null) - makes the camera wait until it is no longer busy - cm_wait&lt;br /&gt;
&lt;br /&gt;
===developer console===&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;co_show_all - shows all registered variables and commands - co_show_all&amp;lt;span&amp;gt;&lt;br /&gt;
*console_print - dumps all arguments&lt;br /&gt;
*co_toggle_text - cycles console text color&lt;br /&gt;
*dump_docs - shows all registered variables and commands&lt;br /&gt;
*text_console name:string - turns on the text console display&lt;br /&gt;
&lt;br /&gt;
===console===&lt;br /&gt;
*console_activate console_id:int - activates a console - console_activate 14&lt;br /&gt;
*console_deactivate console_id:int - deactivates a console - console_deactivate 5&lt;br /&gt;
*console_reset console_id:int - resets a console to initial state - console_reset 7 text_console name:string - Turns on the text console display - text_console level_6d&lt;br /&gt;
&lt;br /&gt;
===corpse===&lt;br /&gt;
*corpse_reset (null) - resets corpses to their initial state - corpse_reset&lt;br /&gt;
*make_corpse corpse_name:string - makes a corpse&lt;br /&gt;
*trigvolume_corpse trig_id:int - kills all the corpses inside a trigger volume - trigvolume_corpse 32&lt;br /&gt;
&lt;br /&gt;
===cutscene===&lt;br /&gt;
*begin_cutscene flag:string{&amp;quot;weapon&amp;quot; | &amp;quot;jello&amp;quot; | &amp;quot;ai&amp;quot; | &amp;quot;invis&amp;quot; | &amp;quot;nosync&amp;quot; | &amp;quot;keepparticles&amp;quot; | &amp;quot;animation&amp;quot; | &amp;quot;nojump&amp;quot;} - begins a cutscene - begin_cutscene&lt;br /&gt;
&#039;&#039;begin_cutscene weapon - player does not holster his weapon when cutscene starts&#039;&#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;what about ai, animation, invis, jello, keepparticles, nojump, nosync?&#039;&#039;&lt;br /&gt;
*cutscene_sync state:string{&amp;quot;mark&amp;quot; | &amp;quot;on&amp;quot; | &amp;quot;off&amp;quot;} - marks a point in a cutscene - cutscene_sync on&lt;br /&gt;
*end_cutscene (null) - ends a cutscene - end_cutscene&lt;br /&gt;
*fade_in ticks:int - fades the screen in - fade_in 120&lt;br /&gt;
*fade_out [r:float | r:int] [g:float | g:int] [b:float | b:int] ticks:int - fades the screen out - fade_out 0 0 0 120&lt;br /&gt;
*input on_off:int{0 | 1} - turns input on or off - input 0&lt;br /&gt;
*letterbox start_stop:int{0 | 1} - starts or stops letterboxing - letterbox 0&lt;br /&gt;
&lt;br /&gt;
===diary===&lt;br /&gt;
*diary_page_unlock page:int - unlocks a specific diary page on the current level&lt;br /&gt;
&lt;br /&gt;
===door===&lt;br /&gt;
*door_open door_id:int - opens a door (may not stay open) - door_open 21&lt;br /&gt;
*door_close door_id:int - closes a door (may not stay open) - door_close 27&lt;br /&gt;
*door_lock door_id:int - locks a door - door_lock 6&lt;br /&gt;
*door_unlock door_id:int - unlocks a door - door_unlock 5&lt;br /&gt;
*door_jam door_id:int - jams a door in its current state - door_jam 5&lt;br /&gt;
*door_unjam door_id:int - unjams a door so characters can open it - door_unjam 8&lt;br /&gt;
&lt;br /&gt;
===env===&lt;br /&gt;
*debug_env_anim name:string - draws a line for an environment animation&lt;br /&gt;
*env_anim obj_id:int [ obj_id:int] - initiates an environment animation for an object - env_anim 901 906&lt;br /&gt;
*env_anim_block obj_id:int [ obj_id:int] - initiates an environment animation: blocks until completed&lt;br /&gt;
*env_broken gq_ref:int [gq_endref:int] - computes the number of objects in a range that have all their glass broken - env_broken(3001, 3018);&lt;br /&gt;
*env_setanim obj_id:int object_name:string - sets up an animation for an object - env_setanim 52 truckcabstop&lt;br /&gt;
*env_setanim_block obj_id:int object_name:string - sets up an animation: blocks until completed&lt;br /&gt;
*env_shade gq_ref:int gq_ref:int r:float g:float b:float - sets the shade of a block of objects - env_shade 1500 1501 .9 .8 .9&lt;br /&gt;
*env_show gq_ref:int on_off:int{0 | 1} - turns on or off specified parts of the environment - env_show 31 1&lt;br /&gt;
*env_texswap gq_start:int tex_name:string - swaps an environment texture - env_texswap 401 PIPE_YELLOW&lt;br /&gt;
&#039;&#039;tested in level 19 save point 4&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===film===&lt;br /&gt;
*chr_playback [ai_name:string | script_id:int] film_name:string [mode:string{&amp;quot;fromhere&amp;quot; | &amp;quot;interp&amp;quot;}] [num_frames:int] - plays back a film&lt;br /&gt;
*chr_playback_block [ai_name:string | script_id:int] film_name:string [mode:string{&amp;quot;fromhere&amp;quot; | &amp;quot;interp&amp;quot;}] [num_frames:int] - plays back a film and blocks until complete&lt;br /&gt;
*chr_playback_debug film_name:string - dumps stats for a playback film&lt;br /&gt;
*playback [ai_name:string | script_id:int] film_name:string [mode:string{&amp;quot;fromhere&amp;quot; | &amp;quot;interp&amp;quot;}] [num_frames:int] - plays back a film -  Hangar1_A_Striker_1 hangar1_striker1 interp 30&lt;br /&gt;
*playback_block [ai_name:string | script_id:int] film_name:string [mode:string{&amp;quot;fromhere&amp;quot; | &amp;quot;interp&amp;quot;}] [num_frames:int] - plays back a film and blocks until complete - playback_block Start_Friend_1 roll fromhere // playback_block hangar1f_enemy_2 bomber_jump interp 30&lt;br /&gt;
*playback_debug film_name:string - dumps stats for a playback film&lt;br /&gt;
*sc_focus chr_index:int - sets which character we&#039;re authoring for a film&lt;br /&gt;
&lt;br /&gt;
===game (miscellaneous)===&lt;br /&gt;
*chr_has_empty_weapon [ai_name:string | script_id:int] - returns if this character is holding a weapon that is empty - chr_has_empty_weapon(char_0)&lt;br /&gt;
*chr_has_lsi [ai_name:string | script_id:int] - records that the character has the lsi - chr_has_lsi(0)&lt;br /&gt;
*chr_is_player [ai_name:string | script_id:int] - returns if this character is the player - chr_is_player(character)&lt;br /&gt;
*crash when:string{&amp;quot;now&amp;quot;} - crashes the game (used for testing error handling)&lt;br /&gt;
*did_kill_griffen (null) - returns if we did kill griffen - did_kill_griffen()&lt;br /&gt;
*difficulty (null) - returns the difficulty level&lt;br /&gt;
*flag_view_prefix prefix:string - view flags with a specific prefix&lt;br /&gt;
*hang when:string{&amp;quot;now&amp;quot;} - hangs the game (used for testing error handling)&lt;br /&gt;
*killed_griffen murder:bool - sets if we killed griffen - killed_griffen 1&lt;br /&gt;
*lose (null) - lose this level - lose&lt;br /&gt;
*perf_prefix - sets the perf prefix&lt;br /&gt;
*ph_status - xxx&lt;br /&gt;
&#039;&#039;lists the physics status (collision type) of objects (characters, weapons, doors, etc.) that are currently in use&#039;&#039;&lt;br /&gt;
*print_state state:int - prints an anim state&lt;br /&gt;
*print_type type:int - prints an anim type &lt;br /&gt;
*restore_game (null) - restores the game - restore_game&lt;br /&gt;
*save_game save_point:int [type:string{&amp;quot;autosave&amp;quot;}] - saves the game - save_game 1 autosave&lt;br /&gt;
*splash_screen texture:string - displays a splash screen - splash_screen warehouse_splash_screen&lt;br /&gt;
*tr_stop_lookup - bla bla bla&lt;br /&gt;
*tr_write_animation anim_name:string file_name:string - bla bla bla&lt;br /&gt;
*tr_write_collection collection_name:string file_name:string - bla bla bla&lt;br /&gt;
*tr_write_lookup file_name:string - bla bla bla&lt;br /&gt;
*win (null) - win this level - win&lt;br /&gt;
&lt;br /&gt;
===graphics===&lt;br /&gt;
*gl_fog_end_changeto end_val:float [frames:int] - changes the fog end distance smoothly&lt;br /&gt;
*gl_fog_start_changeto start_val:float [frames:int] - changes the fog start distance smoothly - gl_fog_start_changeto .995 30&lt;br /&gt;
*gs_farclipplane_set plane:float - sets the far clipping plane - gs_farclipplane_set 5000&lt;br /&gt;
*gs_fov_set fov_degrees:float - sets the field of view - gs_fov_set 300&lt;br /&gt;
*m3_display_list - lists all the display modes&lt;br /&gt;
*m3_display_set device_index:int mode_index:int - sets the active display mode&lt;br /&gt;
*m3_draw_engine_list - lists all the engines&lt;br /&gt;
*m3_engine_set geom_engine:int draw_engine:int - sets the active engine&lt;br /&gt;
*m3_geom_engine_list - lists all the engines&lt;br /&gt;
*m3_quality_set quality:string - sets the current graphics quality&lt;br /&gt;
&lt;br /&gt;
===input===&lt;br /&gt;
*bind input_name:string to:string{&amp;quot;to&amp;quot;} input_function:string - binds an input to a function - bind numpad0 to forward&lt;br /&gt;
*lock_keys [key_name:string] - locks keys out - lock_keys keys_walk &#039;&#039;key name strings: keys_reload, keys_hypo, keys_walk, keys_inventory, keys_action, keys_pause, keys_attack, keys_crouch, keys_jump, keys_movement&#039;&#039;&lt;br /&gt;
*unbind input_name:string - removes a binding from a input function - unbind numpad0&lt;br /&gt;
*unbindall (null) - removes all bindings - unbindall&lt;br /&gt;
&lt;br /&gt;
===message===&lt;br /&gt;
*dmsg astring:string - debugging message - dmsg [b. hello]&lt;br /&gt;
&#039;&#039;[b. hello] ==&amp;gt; b stands for blue, it&#039;s the colour of the word hello [.hello] ==&amp;gt; without a character in front of the point, the colour of the word is white. Available colours: b (blue), c (cyan), g (green), l (lila), o (orange), r (red), u (umber), y (yellow)&#039;&#039;&lt;br /&gt;
*dprint astring:string - debugging print&lt;br /&gt;
*message message:string [timer:int] - sends a message from the subtitle file - message begin_fight 240&lt;br /&gt;
*message_remove [message:string] - removes a currently displayed message - message_remove c01_50_23 // message_remove&lt;br /&gt;
&lt;br /&gt;
===movie===&lt;br /&gt;
*movie_play name:string - function to start a movie playing&lt;br /&gt;
&lt;br /&gt;
===object===&lt;br /&gt;
*obj_create obj_id:int [obj_id:int] - creates a range of objects - obj_create 81 82&lt;br /&gt;
*obj_force_draw obj_id:int [obj_id:int] - locks an object as visible - obj_force_draw 501 504&lt;br /&gt;
*obj_hide obj_id:int [obj_id:int] - hides an object &lt;br /&gt;
*obj_kill obj_id:int [obj_id:int] - kills a range of object - obj_kill 100 104&lt;br /&gt;
*obj_shade obj_id:int [obj_id:int] r:float g:float b:float - turns display of an object on or off - obj_shade 801 801 .4 .4 .4&lt;br /&gt;
*obj_show obj_id:int [obj_id:int] - shows an object - obj_show 481 481&lt;br /&gt;
&lt;br /&gt;
===objective===&lt;br /&gt;
*objective_complete (null) - plays the objective-complete sound&lt;br /&gt;
*objective_set page:int [make_silent:string {&amp;quot;silent&amp;quot;}] - sets the current objective page - objective_set(7,silent) // objective_set 3 silent&lt;br /&gt;
&lt;br /&gt;
===particle===&lt;br /&gt;
*p3_callevent particle_class:string event_index:int - triggers an event on all P3 particles of a specified class&lt;br /&gt;
*p3_count - lists a count of P3 particles&lt;br /&gt;
*p3_daodan_disable - disables parts of the daodan shield (for debugging)&lt;br /&gt;
*p3_dumpparticles - dump all particles to a text file&lt;br /&gt;
*p3_killall - kills all P3 particles&lt;br /&gt;
*p3_killnearest - kills the nearest P3 particle&lt;br /&gt;
*p3_printtags - prints out all environmental particles with tags&lt;br /&gt;
*p3_removedangerous (null) - removes all &amp;quot;dangerous projectile&amp;quot; particles by making their lifetime expire - p3_removedangerous&lt;br /&gt;
*p3_spawn particle_class:string [velocity:float | ] - spawns a new P3 particle&lt;br /&gt;
*p3_startall - creates and starts all environmental particles&lt;br /&gt;
*p3_stopall - stops all environmental particles&lt;br /&gt;
*p3_writeusedparticles - writes all particles used on this level to a text file&lt;br /&gt;
*particle - sends a command to environmental particles with a given tag&lt;br /&gt;
*particle_temp_kill - kills any temporary particles&lt;br /&gt;
*particle_temp_start - starts temporary-particle-creation mode&lt;br /&gt;
*particle_temp_stop - stops temporary-particle-creation mode&lt;br /&gt;
&lt;br /&gt;
===player===&lt;br /&gt;
*fall_back (null) - makes the player character fall back - fall_back&lt;br /&gt;
*fall_front (null) - makes the player character fall front - fall_front&lt;br /&gt;
*give_powerup powerup_name:string [amount:int] [character:int] - Gives a powerup to a character - give_powerup ammo&lt;br /&gt;
&#039;&#039;powerup strings: ammo, cell, hypo, shield (in percent), invis (in frames, -1 = forever), lsi (amount ignored)&#039;&#039;&lt;br /&gt;
*goto [loc_x:float loc_y:float loc_z:float] - Sets the location of the player character - goto 100 100 100&lt;br /&gt;
&lt;br /&gt;
===powerup===&lt;br /&gt;
*chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup - chr_givepowerup 0 ammo 1&lt;br /&gt;
*give_powerup powerup_name:string [amount:int] [character:int] - Gives a powerup to a character - give_powerup ammo&lt;br /&gt;
&#039;&#039;to both above: powerup strings: ammo, cell, hypo, shield (in percent), invis (in frames), lsi (amount ignored)&#039;&#039;&lt;br /&gt;
*powerup_reset (null) - resets all placed powerups to their starting points - powerup_reset&lt;br /&gt;
*powerup_spawn poweruptype:string flag:int - creates a new powerup - powerup_spawn ammo 7042&lt;br /&gt;
&lt;br /&gt;
===reset===&lt;br /&gt;
*ai2_reset [reset_player:int] - resets AI as if start of level - ai2_reset&lt;br /&gt;
&#039;&#039;It reset consoles, and clears characters like you started the level again&#039;&#039;&lt;br /&gt;
*chr_inv_reset [ai_name:string | script_id:int] - clears a characters inventory - chr_inv_reset ambush_tanker_1a&lt;br /&gt;
*cm_reset [maxspeed:float] [maxFocalAccel:float] - resets the camera - cm_reset&lt;br /&gt;
*console_reset console_id:int - resets a console to initial state - console_reset 7&lt;br /&gt;
*corpse_reset (null) - resets corpses to their initial state - corpse_reset&lt;br /&gt;
*powerup_reset (null) - resets all placed powerups to their starting points - powerup_reset&lt;br /&gt;
*reset_mechanics (null) - resets all level mechanics (triggers, turrets, consoles, etc...) to initial state - reset_mechanics&lt;br /&gt;
*script_reload - reload scripts for a level&lt;br /&gt;
*sound_objects_reset (null) - reloads the sounds objects&lt;br /&gt;
*trig_reset trigger_id:int - resets a trigger to non-triggered state - trig_reset 91&lt;br /&gt;
*trigvolume_reset name:string - reset a trigger volume to its level-load state - trigvolume_reset tv_move4&lt;br /&gt;
*turret_reset turret_id:int - resets a turret to initial state&lt;br /&gt;
*weapon_reset (null) - resets all unheld weapons to their starting state - weapon_reset&lt;br /&gt;
&lt;br /&gt;
===slowmotion===&lt;br /&gt;
*slowmo duration:int - starts the slowmotion timer - slowmo 120&lt;br /&gt;
&lt;br /&gt;
===sound===&lt;br /&gt;
*chr_pain [ai_name:string | script_id:int] pain_type:string - forces a character to play a pain sound&lt;br /&gt;
&#039;&#039;pain type strings: light, medium, heavy, death&#039;&#039;&lt;br /&gt;
*chr_talk [ai_name:string | script_id:int] sound_name:string pre_pause:int post_pause:int [priority:string | ] - causes a character to play a line of dialogue - chr_talk victim_mansci_1 c02_62_11sci 0 0&lt;br /&gt;
*sound_ambient_start name:string [volume:float] - function to start an ambient sound - sound_ambient_start alarm_loop&lt;br /&gt;
*sound_ambient_stop name:string - function to stop an ambient sound - sound_ambient_stop alarm_loop&lt;br /&gt;
*sound_ambient_volume name:string [volume:float] [time:float] - function to set the volume of a playing ambient sound - sound_ambient_volume alarm_loop .35 1.0&lt;br /&gt;
*sound_dialog_play name:string - function to start character dialog playing - sound_dialog_play c00_01_18shinatama&lt;br /&gt;
*sound_dialog_play_block name:string - function to start character dialog playing after the current dialog finishes - sound_dialog_play_block c00_01_67shinatama&lt;br /&gt;
*sound_dialog_play_interrupt name:string - function to interrupt the current character dialog and play a new one - sound_dialog_play_interrupt c00_01_66shinatama&lt;br /&gt;
*sound_impulse_play name:string [volume:float] - function plays an impulse sound - sound_impulse_play glass_big 1.0&lt;br /&gt;
*sound_list_broken_links - function writes a list of sounds which have broken links to a file&lt;br /&gt;
*sound_music_start name:string [volume:float] - function to start music playing - sound_music_start mus_asian 0.75&lt;br /&gt;
*sound_music_stop name:string - function to stop playing music - sound_music_stop mus_asian&lt;br /&gt;
*sound_music_volume name:string volume:float [time:float] - function to set the volume of playing music - sound_music_volume mus_asian 0.35 1.0&lt;br /&gt;
*sound_objects_reset (null) - reloads the sounds objects&lt;br /&gt;
&lt;br /&gt;
===target===&lt;br /&gt;
*target_set flag_id:int min_distance:float - Sets the target to the specified flag - target_set(7085,30.00)&lt;br /&gt;
&lt;br /&gt;
===timer===&lt;br /&gt;
*timer_start duration:float script:string - starts the countdown timer - timer_start 30 pipe1b&lt;br /&gt;
*timer_stop (null) - stops the countdown timer - timer_stop&lt;br /&gt;
&lt;br /&gt;
===triggers (lasers)===&lt;br /&gt;
*trig_activate trigger_id:int - activates a trigger - trig_activate 2&lt;br /&gt;
*trig_deactivate trigger_id:int - deactivates a trigger - trig_deactivate 2&lt;br /&gt;
*trig_hide trigger_id:int - hides a trigger - trig_hide 91&lt;br /&gt;
*trig_show trigger_id:int - shows a trigger - trig_show 91&lt;br /&gt;
*trig_speed trigger_id:int volume:float - sets a triggers speed - trig_speed 514 .15&lt;br /&gt;
*trig_reset trigger_id:int - resets a trigger to non-triggered state - trig_reset 91&lt;br /&gt;
&lt;br /&gt;
===trigger volumes===&lt;br /&gt;
*trigvolume_corpse trig_id:int - kills all the corpses inside a trigger volume - trigvolume_corpse 32&lt;br /&gt;
*trigvolume_count trig_id:int - counts the number of people in a trigger volume - trigvolume_count(36)&lt;br /&gt;
*trigvolume_enable name:string enable:int{0 | 1} [type:string{&amp;quot;all&amp;quot; | &amp;quot;entry&amp;quot; | &amp;quot;inside&amp;quot; | &amp;quot;exit&amp;quot;}] - enable or disable a trigger volume - trigvolume_enable lowroad1 0&lt;br /&gt;
*trigvolume_kill trig_id:int - kills all the characters inside a trigger volume - trigvolume_kill 64&lt;br /&gt;
*trigvolume_reset name:string - reset a trigger volume to its level-load state - trigvolume_reset tv_move4&lt;br /&gt;
*trigvolume_setscript name:string script:string type:string{&amp;quot;entry&amp;quot; | &amp;quot;inside&amp;quot; | &amp;quot;exit&amp;quot;} - set the script to call from a trigger volume&lt;br /&gt;
*trigvolume_trigger name:string type:string{&amp;quot;entry&amp;quot; | &amp;quot;inside&amp;quot; | &amp;quot;exit&amp;quot;} [ai_name:string | script_id:int] - fire off a trigger volume&lt;br /&gt;
&lt;br /&gt;
===turret===&lt;br /&gt;
*turret_activate turret_id:int - activates a turret&lt;br /&gt;
*turret_deactivate turret_id:int - deactivates a turret - turret_deactivate 20&lt;br /&gt;
*turret_reset turret_id:int - resets a turret to initial state&lt;br /&gt;
&lt;br /&gt;
===ui (HUD)===&lt;br /&gt;
*ui_fill_element element_name:string fill:int - sets part of the HUD to completely filled&lt;br /&gt;
*ui_flash_element element_name:string fill:int - sets part of the HUD to flash or not flash - ui_flash_element compass 1 (health)&lt;br /&gt;
*ui_show_element element_name:string show:int - shows or hides part of the HUD - ui_show_element left 1&lt;br /&gt;
*ui_show_help enable:int - debugging: enables the HUD help overlays - ui_show_help 1&lt;br /&gt;
&lt;br /&gt;
===weapon===&lt;br /&gt;
*weapon_reset (null) - resets all unheld weapons to their starting state - weapon_reset&lt;br /&gt;
*weapon_spawn weapontype:string flag:int - creates a new weapon - weapon_spawn w3_phr 7045&lt;br /&gt;
&lt;br /&gt;
[[Category:Bungie scripting language docs]]&lt;/div&gt;</summary>
		<author><name>Sdm</name></author>
	</entry>
</feed>