19,703
edits
Script 10k (talk | contribs) m (→Declaration)  | 
				 (→Native functions:  removing ai2_barabbas_run as it is a variable)  | 
				||
| Line 122: | Line 122: | ||
*Commands surrounded with '''**'''	The same as above, but you have to activate the developer mode.  | *Commands surrounded with '''**'''	The same as above, but you have to activate the developer mode.  | ||
*<span style="color:green"> Commands in this colour will not work on a Mac nor the PC demo version</span>  | *<span style="color:green"> Commands in this colour will not work on a Mac nor the PC demo version</span>  | ||
===ai2_===  | ===ai2_===  | ||
'''Commands which have an effect on all AIs:'''  | '''Commands which have an effect on all AIs:'''  | ||
| Line 134: | Line 135: | ||
*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  | *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  | ||
*ai2_barabbas_retrievegun [ai_name:string | script_id:int] - makes barabbas retrieve his gun if it is lost - ai2_barabbas_retrievegun barabus  | *ai2_barabbas_retrievegun [ai_name:string | script_id:int] - makes barabbas retrieve his gun if it is lost - ai2_barabbas_retrievegun barabus  | ||
*ai2_chump (null) - creates a chump  | *ai2_chump (null) - creates a chump  | ||
*ai2_chump_stop - stops the chump  | *ai2_chump_stop - stops the chump  | ||
| Line 243: | Line 243: | ||
===cinematic_===  | ===cinematic_===  | ||
*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)  | *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)  | ||
*cinematic_stop bitmap_name:string end:int velocity:float - stop the display of a cinematic insert - cinematic_stop (KONtalkangryfront, 16, 20)  | *cinematic_stop bitmap_name:string end:int velocity:float - stop the display of a cinematic insert - cinematic_stop (KONtalkangryfront, 16, 20)  | ||
| Line 266: | Line 265: | ||
===console_===  | ===console_===  | ||
*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 272: | Line 270: | ||
===corpse===  | ===corpse===  | ||
*<span style="color:green">corpse_reset (null) - resets corpses to their initial state - *corpse_reset*</span>  | *<span style="color:green">corpse_reset (null) - resets corpses to their initial state - *corpse_reset*</span>  | ||
*<span style="color:green">make_corpse corpse_name:string - makes a corpse</span>  | *<span style="color:green">make_corpse corpse_name:string - makes a corpse</span>  | ||
| Line 278: | Line 275: | ||
===cutscene===  | ===cutscene===  | ||
*begin_cutscene (null) - begins a cutscene - begin_cutscene  | *begin_cutscene (null) - begins a cutscene - begin_cutscene  | ||
| Line 293: | Line 289: | ||
===diary_===  | ===diary_===  | ||
*<span style="color:green"> diary_page_unlock page:int - unlocks a specific diary page on the current level</span>  | *<span style="color:green"> diary_page_unlock page:int - unlocks a specific diary page on the current level</span>  | ||
===door_===  | ===door_===  | ||
*door_open door_id:int - opens a door (may not stay open) - door_open 21  | *door_open door_id:int - opens a door (may not stay open) - door_open 21  | ||
*door_close door_id:int - closes a door (may not stay open) - door_close 27  | *door_close door_id:int - closes a door (may not stay open) - door_close 27  | ||
| Line 306: | Line 300: | ||
===env_===  | ===env_===  | ||
*env_anim obj_id:int [ obj_id:int] - initiates an environment animation for an object - env_anim 901 906  | *env_anim obj_id:int [ obj_id:int] - initiates an environment animation for an object - env_anim 901 906  | ||
*env_anim_block obj_id:int [ obj_id:int] - initiates an environment animation: blocks until completed  | *env_anim_block obj_id:int [ obj_id:int] - initiates an environment animation: blocks until completed  | ||
| Line 318: | Line 311: | ||
===game===  | ===game===  | ||
*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)  | *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)  | ||
*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)  | ||
| Line 333: | Line 325: | ||
===graphics===  | ===graphics===  | ||
*gl_fog_end_changeto end_val:float [frames:int] - changes the fog end distance smoothly  | *gl_fog_end_changeto end_val:float [frames:int] - changes the fog end distance smoothly  | ||
*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  | ||
| Line 340: | Line 331: | ||
===input===  | ===input===  | ||
*bind input_name:string to:string{"to"} input_function:string - binds an input to a function - *bind numpad0 to forward*  | *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''  | ||
| Line 347: | Line 337: | ||
===message===  | ===message===  | ||
*dmsg astring:string - debugging message - *dmsg [b. hello]*  | *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)''  | ||
| Line 354: | Line 343: | ||
===movie===  | ===movie===  | ||
*movie_play name:string - function to start a movie playing  | *movie_play name:string - function to start a movie playing  | ||
===object===  | ===object===  | ||
*obj_create obj_id:int [obj_id:int] - creates a range of objects - obj_create 81 82  | *obj_create obj_id:int [obj_id:int] - creates a range of objects - obj_create 81 82  | ||
*obj_force_draw obj_id:int [obj_id:int] - locks an object as visible - obj_force_draw 501 504  | *obj_force_draw obj_id:int [obj_id:int] - locks an object as visible - obj_force_draw 501 504  | ||
| Line 367: | Line 354: | ||
===objective===  | ===objective===  | ||
*<span style="color:green">objective_complete (null) - plays the objective-complete sound</span>  | *<span style="color:green">objective_complete (null) - plays the objective-complete sound</span>  | ||
*objective_set page:int [make_silent:string {"silent"}] - Sets the current objective page - objective_set(7,silent) // *objective_set 3 silent*  | *objective_set page:int [make_silent:string {"silent"}] - Sets the current objective page - objective_set(7,silent) // *objective_set 3 silent*  | ||
===player===  | ===player===  | ||
*<span style="color:green">fall_back (null) - makes the player character fall back - *fall_back*</span>  | *<span style="color:green">fall_back (null) - makes the player character fall back - *fall_back*</span>  | ||
*<span style="color:green">fall_front (null) - makes the player character fall front - *fall_front*</span>  | *<span style="color:green">fall_front (null) - makes the player character fall front - *fall_front*</span>  | ||
| Line 380: | Line 365: | ||
===powerup===  | ===powerup===  | ||
*chr_givepowerup [ai_name:string | script_id:int] powerup:string [amount:int] - gives a character a powerup - *chr_givepowerup 0 ammo 1*  | *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  | ||
| Line 388: | Line 372: | ||
===reset===  | ===reset===  | ||
*ai2_reset [reset_player:int] - resets AI as if start of level - *ai2_reset*  | *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''  | ||
| Line 404: | Line 387: | ||
===slowmotion===  | ===slowmotion===  | ||
*slowmo duration:int - starts the slowmotion timer - slowmo 120  | *slowmo duration:int - starts the slowmotion timer - slowmo 120  | ||
===sound===  | ===sound===  | ||
*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''  | ||
| Line 425: | Line 406: | ||
===target===  | ===target===  | ||
*target_set flag_id:int min_distance:float - Sets the target to the specified flag - target_set(7085,30.00)  | *target_set flag_id:int min_distance:float - Sets the target to the specified flag - target_set(7085,30.00)  | ||
===timer===  | ===timer===  | ||
*timer_start duration:float script:string - starts the countdown timer - timer_start 30 pipe1b  | *timer_start duration:float script:string - starts the countdown timer - timer_start 30 pipe1b  | ||
*timer_stop (null) - stops the countdown timer - timer_stop  | *timer_stop (null) - stops the countdown timer - timer_stop  | ||
===laser triggers===  | ===laser triggers===  | ||
*trig_activate trigger_id:int - activates a trigger - trig_activate 2  | *trig_activate trigger_id:int - activates a trigger - trig_activate 2  | ||
*trig_deactivate trigger_id:int - deactivates a trigger - trig_deactivate 2  | *trig_deactivate trigger_id:int - deactivates a trigger - trig_deactivate 2  | ||
| Line 443: | Line 421: | ||
===trigger volumes===  | ===trigger volumes===  | ||
*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  | ||
*trigvolume_count trig_id:int - counts the number of people in a trigger volume - trigvolume_count(36)  | *trigvolume_count trig_id:int - counts the number of people in a trigger volume - trigvolume_count(36)  | ||
| Line 453: | Line 430: | ||
===turret===  | ===turret===  | ||
*turret_activate turret_id:int - activates a turret  | *turret_activate turret_id:int - activates a turret  | ||
*turret_deactivate turret_id:int - deactivates a turret - turret_deactivate 20  | *turret_deactivate turret_id:int - deactivates a turret - turret_deactivate 20  | ||
*turret_reset turret_id:int - resets a turret to initial state  | *turret_reset turret_id:int - resets a turret to initial state  | ||
===ui (  | ===ui (HUD)===  | ||
*<span style="color:green">ui_fill_element element_name:string fill:int - sets part of the HUD to completely filled</span>  | *<span style="color:green">ui_fill_element element_name:string fill:int - sets part of the HUD to completely filled</span>  | ||
*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)  | ||
| Line 466: | Line 441: | ||
===weapon===  | ===weapon===  | ||
*<span style="color:green">weapon_reset (null) - resets all unheld weapons to their starting state - *weapon_reset*</span>  | *<span style="color:green">weapon_reset (null) - resets all unheld weapons to their starting state - *weapon_reset*</span>  | ||
*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]]  | ||