BSL:Functions: Difference between revisions

documented chr_talk
(added big warning to chr_holdkey because BWest never finished writing the code for it)
(documented chr_talk)
 
(One intermediate revision by the same user not shown)
Line 187: Line 187:
*chr_super [ai_name:string | script_id:int] super_amount:float - set's a character's super value
*chr_super [ai_name:string | script_id:int] super_amount:float - set's a character's super value
''This sets a character's "<u>external</u> super" value, meaning their Daodan glow, but will not grant them any special powers such as Daodan overpower. It is used to give Konoko her Daodan glow in the Mountain Compound opening cutscene (she isn't granted overhealth until the cutscene ends). The super_amount value determines the brightness of the Daodan particles: consider the effective range to be 1-10. The Compound cutscene gives Konoko a glow of 1, and the cheat code "chenille" gives her a glow of 10.''
''This sets a character's "<u>external</u> super" value, meaning their Daodan glow, but will not grant them any special powers such as Daodan overpower. It is used to give Konoko her Daodan glow in the Mountain Compound opening cutscene (she isn't granted overhealth until the cutscene ends). The super_amount value determines the brightness of the Daodan particles: consider the effective range to be 1-10. The Compound cutscene gives Konoko a glow of 1, and the cheat code "chenille" gives her a glow of 10.''
*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
''Only used once in the game, when <code>chr_talk victim_mansci_1 c02_62_11sci 0 0</code> is called for Dr. Kafelnikov's yell when he runs away. Normally dialogue is played with <tt>sound_dialog_play[_block]</tt>, but <tt>chr_talk</tt> has the interesting difference of attaching the sound to the character in the world (like dialogue that plays in NPC interactions), which means it should fade away as they get farther from the player. <tt>chr_talk</tt> also employs a unique "talk buffer" not used by any other command, where up to 8 sounds can be queued for the AI to play; if the queue is full then the <tt>chr_talk</tt> command will be discarded. The optional "priority" argument has these choices: "idle", "chatter", "say", "call", "pain", "yell", "override". If you specify "override", the sound will play immediately, but only if the talk buffer was not full.''
*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
Line 193: Line 194:
*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
*chr_vocalize [ai_name:string | script_id:int] type:string - makes a character utter a vocalization (vocalize type strings: taunt, alert, startle, checkbody, pursue, cower, superpunch, superkick, super3, super4). Character must be present in AISA file in order to work. Otherwise it will vocalize only the player.
*chr_vocalize [ai_name:string | script_id:int] type:string - makes a character utter a vocalization (vocalize type strings: "taunt", "alert", "startle", "checkbody", "pursue", "cower", "superpunch", "superkick", "super3", "super4"). Character must be present in AISA file in order to work. Otherwise it will vocalize only the player.
*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
*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
*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
*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
Line 410: Line 411:
*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
''See note under "[[#triggers (lasers)|triggers]]".''
*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
Line 451: Line 453:
*trig_speed trigger_id:int volume:float - sets a triggers speed - trig_speed 514 .15
*trig_speed trigger_id:int volume:float - sets a triggers speed - trig_speed 514 .15
*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
''Pass no trigger ID to <tt>trig_reset</tt>'' to reset all triggers. Note that if a trigger has its "time off" field filled in, it will shut back off after the amount of time specified in that field (but this feature is never used in the vanilla game data).''


===trigger volumes===
===trigger volumes===