18,700
edits
Paradox-01 (talk | contribs) m (chr_set_class, class must exist) |
(→Native functions: updating for Intel Mac build) |
||
Line 80: | Line 80: | ||
==Native functions== | ==Native functions== | ||
Line structure: script command [parameter] - description - example | Line structure: script command [parameter] - description - example | ||
Parameter: | Parameter: | ||
*parameter you have to use this parameter | *parameter | ||
*[parameter] IMO, this parameter is an option. You can use it or not. | :you have to use this parameter | ||
*(null) type only the script command, nothing else | *[parameter] | ||
*no parameter given type the script command and add = 0 or = 1 (sometimes you can add higher numbers, | :IMO, this parameter is an option. You can use it or not. | ||
*(null) | |||
:type only the script command, nothing else | |||
*no parameter given | |||
:type the script command and add "= 0" or "= 1" (sometimes you can add higher numbers, e.g. cm_distance = 200) | |||
*Commands | *<span style="color:green">Commands in this color are Windows-only</span> | ||
*<span style="color:blue">Commands in this color are Mac-only</span> | |||
*<span style="color: | |||
===ai2_=== | ===ai2_=== | ||
Line 128: | Line 99: | ||
*ai2_allpassive passive:int {0 | 1} - stops all AIs from thinking for themselves - ai2_allpassive 1 | *ai2_allpassive passive:int {0 | 1} - stops all AIs from thinking for themselves - ai2_allpassive 1 | ||
*ai2_spawnall (null) - spawns all AI, even those not initially present - | *ai2_spawnall (null) - spawns all AI, even those not initially present - ai2_spawnall | ||
*ai2_takecontrol on_off:int {0 | 1} - makes the AI movement system take control of the player - ai2_takecontrol 1 | *ai2_takecontrol on_off:int {0 | 1} - makes the AI movement system take control of the player - ai2_takecontrol 1 | ||
*ai2_kill [int] - kills all AIs, just use a number as parameter instead of a string | *ai2_kill [int] - kills all AIs, just use a number as parameter instead of a string | ||
Line 145: | Line 116: | ||
*ai2_followme [ai_name:string | script_id:int] - tells an AI to follow the player - ai2_followme s2_t05 | *ai2_followme [ai_name:string | script_id:int] - tells an AI to follow the player - ai2_followme s2_t05 | ||
*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 | *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 | ||
*ai2_idle [ai_name:string | script_id:int] - tells an AI to become idle - | *ai2_idle [ai_name:string | script_id:int] - tells an AI to become idle - ai2_idle A1_intro01 | ||
*ai2_inactive [ai_name:string | script_id:int] - forces an AI into inactive mode | *ai2_inactive [ai_name:string | script_id:int] - forces an AI into inactive mode | ||
*ai2_kill [param1:string] [param2:string] - kills one or more AIs - ai2_kill ScanKerr01 // | *ai2_kill [param1:string] [param2:string] - kills one or more AIs - ai2_kill ScanKerr01 // ai2_kill | ||
*ai2_lookatchar [ai_name:string | script_id:int] [ai_name:string | script_id:int] - tells an AI to look at a character - | *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 | ||
''needs ai2_takecontrol 1 if Konoko should do that'' | ''needs ai2_takecontrol 1 if Konoko should do that'' | ||
*ai2_lookatme [ai_name:string | script_id:int] - tells an AI to look at the player - ai2_lookatme s2_t05 | *ai2_lookatme [ai_name:string | script_id:int] - tells an AI to look at the player - ai2_lookatme s2_t05 | ||
Line 154: | Line 125: | ||
*ai2_makeblind [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI blind - ai2_makeblind ShinShin 1 | *ai2_makeblind [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI blind - ai2_makeblind ShinShin 1 | ||
*ai2_makedeaf [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI deaf - ai2_makedeaf ShinShin 1 | *ai2_makedeaf [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI deaf - ai2_makedeaf ShinShin 1 | ||
*ai2_makeignoreplayer [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI ignore the player - | *ai2_makeignoreplayer [ai_name:string | script_id:int] on_off:int{0 | 1} - makes a single AI ignore the player - ai2_makeignoreplayer ParkStriker 1 | ||
*ai2_movetoflag [ai_name:string | script_id:int] flag_id:int [setfacing:string{"setfacing"}] - tells an AI to move to a flag - | *ai2_movetoflag [ai_name:string | script_id:int] flag_id:int [setfacing:string{"setfacing"}] - tells an AI to move to a flag - ai2_movetoflag 0 1091 | ||
''needs ai2_takecontrol 1 if Konoko should do that'' | ''needs ai2_takecontrol 1 if Konoko should do that'' | ||
''ai2_movetoflag will only work if there is a path to that flag'' | ''ai2_movetoflag will only work if there is a path to that flag'' | ||
*ai2_neutralbehavior [ai_name:string | script_id:int] behavior:string - sets up an AI's neutral-interaction - | *ai2_neutralbehavior [ai_name:string | script_id:int] behavior:string - sets up an AI's neutral-interaction - ai2_neutralbehavior neutral_3 none | ||
*ai2_noncombatant [ai_name:string | script_id:int] non_combatant:int{0 | 1} - sets or clears an AI's non-combatant state - ai2_noncombatant A1_intro01 1 | *ai2_noncombatant [ai_name:string | script_id:int] non_combatant:int{0 | 1} - sets or clears an AI's non-combatant state - ai2_noncombatant A1_intro01 1 | ||
*ai2_panic [ai_name:string | script_id:int] timer:int - makes an AI panic or not panic - | *ai2_panic [ai_name:string | script_id:int] timer:int - makes an AI panic or not panic - ai2_panic A1_s_red02 300 | ||
''I've tried ai2_panic A1_s_red02 300 ==> Oni crashed'' | ''I've tried ai2_panic A1_s_red02 300 ==> Oni crashed'' | ||
*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 | *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 | ||
*ai2_reset [reset_player:int] - resets AI as if start of level - | *ai2_reset [reset_player:int] - resets AI as if start of level - ai2_reset | ||
''It reset consoles, and clears characters like you started the level again'' | ''It reset consoles, and clears characters like you started the level again'' | ||
*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) | *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) | ||
Line 177: | Line 148: | ||
'''Commands which have an effect on all characters:''' | '''Commands which have an effect on all characters:''' | ||
* | *chr_kill_all_ai (null) - kills all the AI (not working?) | ||
'''Commands which have an effect on one character: | '''Commands which have an effect on one character: | ||
Line 189: | Line 160: | ||
*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 | *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 | ||
*chr_delete [ai_name:string | script_id:int] - deletes a character - chr_delete liliput_striker_1 | *chr_delete [ai_name:string | script_id:int] - deletes a character - chr_delete liliput_striker_1 | ||
* | *chr_disarm chr_index:int - disarms a character or everyone | ||
*chr_dontaim [ai_name:string | script_id:int] on_off:int{0 | 1} - disables the weapon variant for a character | *chr_dontaim [ai_name:string | script_id:int] on_off:int{0 | 1} - disables the weapon variant for a character | ||
*chr_envanim [ai_name:string | script_id:int] anim:string [norotation:string{"norotation"} | ] - plays an environment animation on a character - chr_envanim 111 OutroNinjaBox01 norotation | *chr_envanim [ai_name:string | script_id:int] anim:string [norotation:string{"norotation"} | ] - plays an environment animation on a character - chr_envanim 111 OutroNinjaBox01 norotation | ||
Line 195: | Line 166: | ||
*chr_envanim_stop [ai_name:string | script_id:int] - stops any environment animation on a character - chr_envanim_stop IntroNinja | *chr_envanim_stop [ai_name:string | script_id:int] - stops any environment animation on a character - chr_envanim_stop IntroNinja | ||
*chr_facetoflag [ai_name:string | script_id:int] flag_id:int - snaps a character's facing to a flag's facing - chr_facetoflag IntroNinja 600 | *chr_facetoflag [ai_name:string | script_id:int] flag_id:int - snaps a character's facing to a flag's facing - chr_facetoflag IntroNinja 600 | ||
* | *chr_focus chr_index:int - Selects what character to control - chr_focus 1 | ||
*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 | *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 | ||
*chr_freeze [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself - | *chr_freeze [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself -chr_freeze A1_intro01 1 | ||
''[ai_name:string | script_id:int] = 0 don't work'' | ''[ai_name:string | script_id:int] = 0 don't work'' | ||
*chr_full_health [ai_name:string | script_id:int] - sets a characters health to full by script id - chr_full_health 0 | *chr_full_health [ai_name:string | script_id:int] - sets a characters health to full by script id - chr_full_health 0 | ||
*chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup - | *chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup -chr_givepowerup 0 ammo 1 | ||
''powerup strings: ammo, cell, hypo, shield (in percent), invis (invisibility in frames, -1 = forever), lsi (amount is ignored)'' | ''powerup strings: ammo, cell, hypo, shield (in percent), invis (invisibility in frames, -1 = forever), lsi (amount is ignored)'' | ||
*chr_giveweapon [ai_name:string | script_id:int] weapon_name:string - gives a character a new weapon - chr_giveweapon 0 w1_tap | *chr_giveweapon [ai_name:string | script_id:int] weapon_name:string - gives a character a new weapon - chr_giveweapon 0 w1_tap | ||
Line 207: | Line 178: | ||
''This function only returns if the player is out of ammo for the weapon and the weapon is also empty.'' | ''This function only returns if the player is out of ammo for the weapon and the weapon is also empty.'' | ||
*chr_has_lsi [ai_name:string | script_id:int] - records that the character has the lsi - chr_has_lsi(0) | *chr_has_lsi [ai_name:string | script_id:int] - records that the character has the lsi - chr_has_lsi(0) | ||
* | * chr_health chr_index:int [hit_points:int] - sets character's health - chr_health 0 300 | ||
*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 | *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 | ||
*chr_inv_reset [ai_name:string | script_id:int] - clears a characters inventory - chr_inv_reset ambush_tanker_1a | *chr_inv_reset [ai_name:string | script_id:int] - clears a characters inventory - chr_inv_reset ambush_tanker_1a | ||
*chr_invincible [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character invincible - chr_invincible char_0 1 | *chr_invincible [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character invincible - chr_invincible char_0 1 | ||
*chr_is_player [ai_name:string | script_id:int] - returns if this character is the player - chr_is_player(character) | *chr_is_player [ai_name:string | script_id:int] - returns if this character is the player - chr_is_player(character) | ||
* | * 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 | ||
* | * chr_location_settocamera chr_index:int - Sets the location of any character to the camera location -chr_location_settocamera 1 | ||
*chr_lock_active [ai_name:string | script_id:int] - locks the character active - chr_lock_active IntroMuro | *chr_lock_active [ai_name:string | script_id:int] - locks the character active - chr_lock_active IntroMuro | ||
* | *chr_main_class [class_name:string | class_index:int] - sets the main characters class - chr_main_class striker_easy_1 | ||
''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.'' | ''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.'' | ||
*chr_neutral [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself - chr_neutral ParkStriker 1 | *chr_neutral [ai_name:string | script_id:int] passive:int{0 | 1} - stops an AI from thinking for itself - chr_neutral ParkStriker 1 | ||
Line 225: | Line 196: | ||
*chr_playback_block [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film and blocks until complete | *chr_playback_block [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film and blocks until complete | ||
*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); | *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); | ||
* | *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 | ||
*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 | *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 | ||
*chr_shadow [ai_name:string | script_id:int] [on_off:int{0 | 1}] - turns of the shadow for this character - chr_shadow ZomShin 1 | *chr_shadow [ai_name:string | script_id:int] [on_off:int{0 | 1}] - turns of the shadow for this character - chr_shadow ZomShin 1 | ||
*<span style="color:blue">chr_showextent [anim_name:string] - shows the attack extent of an animation - chr_showextent KONOKOjump_bk_kick</span> | |||
''chr_showextent_globals must be on for this to work'' | |||
*<span style="color:blue">chr_showextent_globals - shows the global parts of an attack animation's extent - chr_showextent 1</span> | |||
*chr_super [ai_name:string | script_id:int] super_amount:float - set's a character's super value - chr_super 0 1 | *chr_super [ai_name:string | script_id:int] super_amount:float - set's a character's super value - chr_super 0 1 | ||
*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 | *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 | ||
*chr_teleport [ai_name:string | script_id:int] flag_id:int - teleports a character to a flag - chr_teleport 0 105 | *chr_teleport [ai_name:string | script_id:int] flag_id:int - teleports a character to a flag - chr_teleport 0 105 | ||
*chr_ultra_mode [ai_name:string | script_id:int] [on_off:int{0 | 1}] - enables ultra mode for a character | *chr_ultra_mode [ai_name:string | script_id:int] [on_off:int{0 | 1}] - enables ultra mode for a character | ||
*chr_unkillable [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character unkillable - | *chr_unkillable [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character unkillable - chr_unkillable A1_intro01 1 | ||
*chr_unlock_active [ai_name:string | script_id:int] - unlocks the character active | *chr_unlock_active [ai_name:string | script_id:int] - unlocks the character active | ||
*chr_unstoppable [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character unstoppable - chr_unstoppable IntroMuro 1 | *chr_unstoppable [ai_name:string | script_id:int] [on_off:int{0 | 1}] - makes a character unstoppable - chr_unstoppable IntroMuro 1 | ||
Line 240: | Line 214: | ||
*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 | *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 | ||
*chr_wait_health [ai_name:string | script_id:int] health_amount:float - waits until a character's health falls below a value - chr_wait_health Muro 200 | *chr_wait_health [ai_name:string | script_id:int] health_amount:float - waits until a character's health falls below a value - chr_wait_health Muro 200 | ||
* | * chr_weapon chr_index:int [weapon_name:string | weapon_num:int] - sets the weapon for a give character | ||
*chr_weapon_immune [ai_name:string | script_id:int] - makes a character weapon immune - chr_weapon_immune(vat_bot_1); // | *chr_weapon_immune [ai_name:string | script_id:int] - makes a character weapon immune - chr_weapon_immune(vat_bot_1); // chr_weapon_immune 0 | ||
===cinematic_=== | ===cinematic_=== | ||
Line 253: | Line 227: | ||
===cm_=== | ===cm_=== | ||
*cm_anim cam_spec:string{"move" | "look" | "both"} anim_name:string - initiates a camera animation - cm_anim both OutroCam03 | *cm_anim cam_spec:string{"move" | "look" | "both"} anim_name:string - initiates a camera animation - cm_anim both OutroCam03 | ||
*cm_anim_block cam_spec:string{"move" | "look" | "both"} anim_name:string - initiates a camera animation - | *cm_anim_block cam_spec:string{"move" | "look" | "both"} anim_name:string - initiates a camera animation - cm_anim_block both OutroCam04 | ||
*cm_barabus [ai_name:string | script_id:int] away:float up:float time:int - special camera for barabus | *cm_barabus [ai_name:string | script_id:int] away:float up:float time:int - special camera for barabus | ||
*cm_detach (null) - detaches the camera - cm_detach | *cm_detach (null) - detaches the camera - cm_detach | ||
Line 261: | Line 235: | ||
''if cm_jello 0, the walls aren't transparent any longer'' | ''if cm_jello 0, the walls aren't transparent any longer'' | ||
*cm_orbit speed:float [stopangle:float] - puts the camera in orbit mode - cm_orbit .1 | *cm_orbit speed:float [stopangle:float] - puts the camera in orbit mode - cm_orbit .1 | ||
*cm_orbit_block speed:float [stopangle:float] - puts the camera in orbit mode - | *cm_orbit_block speed:float [stopangle:float] - puts the camera in orbit mode - cm_orbit_block 2 180 | ||
*cm_reset [maxspeed:float] [maxFocalAccel:float] - resets the camera - cm_reset | *cm_reset [maxspeed:float] [maxFocalAccel:float] - resets the camera - cm_reset | ||
*cm_wait (null) - makes the camera wait until it is no longer busy - cm_wait | *cm_wait (null) - makes the camera wait until it is no longer busy - cm_wait | ||
===console_=== | ===console_=== | ||
*<span style="color:green">co_show_all - ?? - ??<span> | |||
*console_activate console_id:int - activates a console - console_activate 14 | *console_activate console_id:int - activates a console - console_activate 14 | ||
*console_deactivate console_id:int - deactivates a console - console_deactivate 5 | *console_deactivate console_id:int - deactivates a console - console_deactivate 5 | ||
Line 271: | Line 246: | ||
===corpse=== | ===corpse=== | ||
* | *corpse_reset (null) - resets corpses to their initial state - corpse_reset | ||
* | *make_corpse corpse_name:string - makes a corpse | ||
*trigvolume_corpse trig_id:int - kills all the corpses inside a trigger volume - trigvolume_corpse 32 | *trigvolume_corpse trig_id:int - kills all the corpses inside a trigger volume - trigvolume_corpse 32 | ||
Line 287: | Line 262: | ||
*letterbox start_stop:int{0 | 1} - starts or stops letterboxing - letterbox 0 | *letterbox start_stop:int{0 | 1} - starts or stops letterboxing - letterbox 0 | ||
*playback [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film - Hangar1_A_Striker_1 hangar1_striker1 interp 30 | *playback [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film - Hangar1_A_Striker_1 hangar1_striker1 interp 30 | ||
*playback_block [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film and blocks until complete - playback_block Start_Friend_1 roll fromhere // | *playback_block [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [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 | ||
===diary_=== | ===diary_=== | ||
* | * diary_page_unlock page:int - unlocks a specific diary page on the current level | ||
===door_=== | ===door_=== | ||
Line 308: | Line 283: | ||
*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 | *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 | ||
*env_show gq_ref:int on_off:int{0 | 1} - turns on or off specified parts of the environment - env_show 31 1 | *env_show gq_ref:int on_off:int{0 | 1} - turns on or off specified parts of the environment - env_show 31 1 | ||
*env_texswap gq_start:int tex_name:string - swaps an environment texture - | *env_texswap gq_start:int tex_name:string - swaps an environment texture - env_texswap 401 PIPE_YELLOW | ||
''tested in level 19 save point 4'' | ''tested in level 19 save point 4'' | ||
Line 329: | Line 304: | ||
*gl_fog_start_changeto start_val:float [frames:int] - changes the fog start distance smoothly - gl_fog_start_changeto .995 30 | *gl_fog_start_changeto start_val:float [frames:int] - changes the fog start distance smoothly - gl_fog_start_changeto .995 30 | ||
*gs_farclipplane_set plane:float - sets the far clipping plane - gs_farclipplane_set 5000 | *gs_farclipplane_set plane:float - sets the far clipping plane - gs_farclipplane_set 5000 | ||
* | *gs_fov_set fov_degrees:float - sets the field of view - gs_fov_set 300 | ||
===input=== | ===input=== | ||
*bind input_name:string to:string{"to"} input_function:string - binds an input to a function - | *bind input_name:string to:string{"to"} input_function:string - binds an input to a function - bind numpad0 to forward | ||
*lock_keys [key_name:string] - locks keys out - lock_keys keys_walk ''key name strings: keys_reload, keys_hypo, keys_walk, keys_inventory, keys_action, keys_pause, keys_attack, keys_crouch, keys_jump, keys_movement'' | *lock_keys [key_name:string] - locks keys out - lock_keys keys_walk ''key name strings: keys_reload, keys_hypo, keys_walk, keys_inventory, keys_action, keys_pause, keys_attack, keys_crouch, keys_jump, keys_movement'' | ||
*unbind input_name:string - removes a binding from a input function - | *unbind input_name:string - removes a binding from a input function - unbind numpad0 | ||
*unbindall (null) - removes all bindings - | *unbindall (null) - removes all bindings - unbindall | ||
===message=== | ===message=== | ||
*dmsg astring:string - debugging message - | *dmsg astring:string - debugging message - dmsg [b. hello] | ||
''[b. hello] ==> b stands for blue, it's the colour of the word hello [.hello] ==> 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)'' | ''[b. hello] ==> b stands for blue, it's the colour of the word hello [.hello] ==> 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)'' | ||
*message message:string [timer:int] - sends a message from the subtitle file - message begin_fight 240 | *message message:string [timer:int] - sends a message from the subtitle file - message begin_fight 240 | ||
*message_remove [message:string] - removes a currently displayed message - message_remove c01_50_23 // | *message_remove [message:string] - removes a currently displayed message - message_remove c01_50_23 // message_remove | ||
===movie=== | ===movie=== | ||
Line 355: | Line 330: | ||
===objective=== | ===objective=== | ||
* | *objective_complete (null) - plays the objective-complete sound | ||
*objective_set page:int [make_silent:string {"silent"}] - Sets the current objective page - objective_set(7,silent) // | *objective_set page:int [make_silent:string {"silent"}] - Sets the current objective page - objective_set(7,silent) // objective_set 3 silent | ||
===player=== | ===player=== | ||
* | *fall_back (null) - makes the player character fall back - fall_back | ||
* | *fall_front (null) - makes the player character fall front - fall_front | ||
*give_powerup powerup_name:string [amount:int] [character:int] - Gives a powerup to a character - give_powerup ammo | *give_powerup powerup_name:string [amount:int] [character:int] - Gives a powerup to a character - give_powerup ammo | ||
''powerup strings: ammo, cell, hypo, shield (in percent), invis (in frames, -1 = forever), lsi (amount ignored)'' | ''powerup strings: ammo, cell, hypo, shield (in percent), invis (in frames, -1 = forever), lsi (amount ignored)'' | ||
* | *goto [loc_x:float loc_y:float loc_z:float] - Sets the location of the player character - goto 100 100 100 | ||
===powerup=== | ===powerup=== | ||
*chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup - | *chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup - chr_givepowerup 0 ammo 1 | ||
*give_powerup powerup_name:string [amount:int] [character:int] - Gives a powerup to a character - give_powerup ammo | *give_powerup powerup_name:string [amount:int] [character:int] - Gives a powerup to a character - give_powerup ammo | ||
''to both above: powerup strings: ammo, cell, hypo, shield (in percent), invis (in frames), lsi (amount ignored)'' | ''to both above: powerup strings: ammo, cell, hypo, shield (in percent), invis (in frames), lsi (amount ignored)'' | ||
* | *powerup_reset (null) - resets all placed powerups to their starting points - powerup_reset | ||
*powerup_spawn poweruptype:string flag:int - creates a new powerup - powerup_spawn ammo 7042 | *powerup_spawn poweruptype:string flag:int - creates a new powerup - powerup_spawn ammo 7042 | ||
===reset=== | ===reset=== | ||
*ai2_reset [reset_player:int] - resets AI as if start of level - | *ai2_reset [reset_player:int] - resets AI as if start of level - ai2_reset | ||
''It reset consoles, and clears characters like you started the level again'' | ''It reset consoles, and clears characters like you started the level again'' | ||
*chr_inv_reset [ai_name:string | script_id:int] - clears a characters inventory - chr_inv_reset ambush_tanker_1a | *chr_inv_reset [ai_name:string | script_id:int] - clears a characters inventory - chr_inv_reset ambush_tanker_1a | ||
*cm_reset [maxspeed:float] [maxFocalAccel:float] - resets the camera - cm_reset | *cm_reset [maxspeed:float] [maxFocalAccel:float] - resets the camera - cm_reset | ||
*console_reset console_id:int - resets a console to initial state - console_reset 7 | *console_reset console_id:int - resets a console to initial state - console_reset 7 | ||
* | *corpse_reset (null) - resets corpses to their initial state - corpse_reset | ||
* | *powerup_reset (null) - resets all placed powerups to their starting points - powerup_reset | ||
*reset_mechanics (null) - resets all level mechanics (triggers, turrets, consoles, etc...) to initial state - | *reset_mechanics (null) - resets all level mechanics (triggers, turrets, consoles, etc...) to initial state - reset_mechanics | ||
*sound_objects_reset (null) - reloads the sounds objects | *sound_objects_reset (null) - reloads the sounds objects | ||
*trig_reset trigger_id:int - resets a trigger to non-triggered state - trig_reset 91 | *trig_reset trigger_id:int - resets a trigger to non-triggered state - trig_reset 91 | ||
*trigvolume_reset name:string - reset a trigger volume to its level-load state - trigvolume_reset tv_move4 | *trigvolume_reset name:string - reset a trigger volume to its level-load state - trigvolume_reset tv_move4 | ||
*turret_reset turret_id:int - resets a turret to initial state | *turret_reset turret_id:int - resets a turret to initial state | ||
* | *weapon_reset (null) - resets all unheld weapons to their starting state - weapon_reset | ||
===slowmotion=== | ===slowmotion=== | ||
Line 393: | Line 368: | ||
*chr_pain [ai_name:string | script_id:int] pain_type:string - forces a character to play a pain sound | *chr_pain [ai_name:string | script_id:int] pain_type:string - forces a character to play a pain sound | ||
''pain type strings: light, medium, heavy, death'' | ''pain type strings: light, medium, heavy, death'' | ||
*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 | *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 | ||
*sound_ambient_start name:string [volume:float] - function to start an ambient sound - sound_ambient_start alarm_loop | *sound_ambient_start name:string [volume:float] - function to start an ambient sound - sound_ambient_start alarm_loop | ||
*sound_ambient_stop name:string - function to stop an ambient sound - sound_ambient_stop alarm_loop | *sound_ambient_stop name:string - function to stop an ambient sound - sound_ambient_stop alarm_loop | ||
Line 436: | Line 411: | ||
===ui (HUD)=== | ===ui (HUD)=== | ||
* | *ui_fill_element element_name:string fill:int - sets part of the HUD to completely filled | ||
*ui_flash_element element_name:string fill:int - sets part of the HUD to flash or not flash - ui_flash_element compass 1 (health) | *ui_flash_element element_name:string fill:int - sets part of the HUD to flash or not flash - ui_flash_element compass 1 (health) | ||
*ui_show_element element_name:string show:int - shows or hides part of the HUD - | *ui_show_element element_name:string show:int - shows or hides part of the HUD - ui_show_element left 1 | ||
* | *ui_show_help enable:int - debugging: enables the HUD help overlays - ui_show_help 1 | ||
===weapon=== | ===weapon=== | ||
* | *weapon_reset (null) - resets all unheld weapons to their starting state - weapon_reset | ||
*weapon_spawn weapontype:string flag:int - creates a new weapon - weapon_spawn w3_phr 7045 | *weapon_spawn weapontype:string flag:int - creates a new weapon - weapon_spawn w3_phr 7045 | ||
[[Category:Bungie scripting language docs]] | [[Category:Bungie scripting language docs]] |