Jump to content

BSL:Functions: Difference between revisions

added info on chr_playback's three modes
m (→‎chr: explaining that chr_animate will loop when trying to satisfy anim_frames, as opposed to holding on the last frame or something; other wording)
(added info on chr_playback's three modes)
Line 218: Line 218:
''Normally used in cutscenes so the player leaves the fighting pose.''
''Normally used in cutscenes so the player leaves the fighting pose.''
*chr_playback [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film
*chr_playback [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film
''See comments on this function where it occurs under the [[#film|film section]].''
*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_playback_debug film_name:string - dumps stats for a playback film
*chr_playback_debug film_name:string - dumps stats for a playback film
Line 320: Line 321:
===film===
===film===
*chr_playback [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film
*chr_playback [ai_name:string | script_id:int] film_name:string [mode:string{"fromhere" | "interp"}] [num_frames:int] - plays back a film
''Film playback has three modes: normal (default), fromhere and interp. When you ask for a film to play without specifying a mode, e.g. <tt>playback 0 IntroKonokoAim</tt> it warps the character to an XYZ starting location contained in the [[FILM]]. If you instead write <tt>playback 0 IntroKonokoAim '''fromhere'''</tt>, it ignores the starting location and plays the film from the character's current location. You can interpolate from the character's current position to the film's starting position with <tt>playback 0 IntroKonokoAim '''interp 20'''</tt> to avoid a small jump in location (however this will be rejected if the distance is greater than 80 world units). You must specify the number of frames at the front of the film to which this interpolation should be applied.''
*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_playback_debug film_name:string - dumps stats for a playback film
*chr_playback_debug film_name:string - dumps stats for a playback film
Line 325: Line 327:
*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
*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
*playback_debug film_name:string - dumps stats for a playback film
*playback_debug film_name:string - dumps stats for a playback film
''The above three functions are simply aliases for chr_playback*.''
*sc_focus chr_index:int - sets which character we're authoring for a film
*sc_focus chr_index:int - sets which character we're authoring for a film