 
        LCCutscene
LCCutscene is a tool to create cutscenes and immersive animations to Lethal Company.
| Last updated | 6 months ago | 
| Total downloads | 1801292 | 
| Total rating | 11 | 
| Categories | Mods Tools Libraries Misc BepInEx Client-side | 
| Dependency string | IntegrityChaos-LCCutscene-2.0.1 | 
| Dependants | 1346 other packages depend on this package | 
This mod requires the following mods to function
 
                        BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
 
LCCutscene (W.I.P.)
LCCutscene is a tool to create cutscenes and immersive animations to Lethal Company. (Originaly made for Diversity)
Examples
Cutscene:
 
Quickscene W.I.P.:
 
 
Usage
Cutscenes
- Add the following namespace:
using LCCutscene;
- Create your custom Cutscene using the Cutsceneclass:
Cutscene(Transform cutsceneTransform, Float cutsceneDuration)
{
    AllowPlayerDeath = false,
    AllowPlayerMovement = false,
    TransitionIn = Transition.FadeOut,
    TransitionOut = Transition.FadeOut,
    TransitionInSpeed = 1f,
    TransitionOutSpeed = 1f
};
NOTE:
The cutscene transform is used for the cutscene camera to clamp on and is recommended to be animated!
- Play your new cutscene using the CutsceneManager:
CutsceneManager.Instance.PlayScene(Cutscene myCutscene);
NOTE:
Only one cutscene can be played at once! (Per player.)
Full Example:
using System.Collections;
using System.Collections.Generic;
using LCCutscene;
using UnityEngine;
public class MyCutscene : MonoBehaviour
{
    public Transform animatedTransform; // The Transform where the cutscene camera will clamp on. //
    public Animatior animator; // Animator for animating your cutscene. //
    private Cutscene scene; // The cutscene itself. //
    void Start()
    {
	    // Create your cutscene. //
        scene = new Cutscene(animatedTransform, 10f)
		{
		    AllowPlayerDeath = false,
		    AllowPlayerMovement = false,
		    TransitionIn = Transition.FadeOut,
		    TransitionOut = Transition.FadeOut
		};
    }
    public void PlayMyCutscene(Collider col)
    {
        CutsceneManager.Instance.PlayScene(scene); // Play your cutscene. //
        animator.SetBool("PlayCameraAnimation", true); // Play your custom animation for your animated transform and much more! //
    }
}
Quick Scenes [W.I.P.]
- Add the following namespace:
using LCCutscene;
- Create your custom Quickscene using the Quicksceneclass:
QuickScene(float duration, Transform targetPosition, float targetRotation, AnimationClip clip, Transform targetEndPosition = null, float? targetEndRotation = null, POVType pov = POVType.Full, PlayerPose startingPose = PlayerPose.Standing, PlayerPose endingPose = PlayerPose.Standing, bool snapPlayersToPositions = true, float snapSpeed = 10f)
NOTE:
The
AnimationClip clipcan also be changed toList<AnimationClip> clipsfor more complex animations for the player. These clips will be played one after another in order.
IMPORTANT:
POVType.ArmsOnlyis currently in W.I.P. and won't be available until updated!
- Play your new Quickscene using the CutsceneManager:
CutsceneManager.Instance.PlayScene(Quickscene myQuickscene);
NOTE:
Only one quickscene can be played at once! (Per player.)
Full Example (Vaulting over desk example):
using System.Collections;
using System.Collections.Generic;
using LCCutscene;
using UnityEngine;
public class MyQuickscene : MonoBehaviour
{
    public Transform startTarget; // The start position and rotation for the player to clamp on. //
    public Transform endTarget; // The end position and rotation for the player to clamp on. //
    public AnimationClip clip; // The animation clip for the Player. //
    public QuickScene scene; // The Quickscene itself. //
    void Start()
    {
	    // Create your Quickscene. //
        scene = new Quickscene(clip.length, startTarget, startTarget.rotation.eulerAngles.y, clip, endTarget, endTarget.rotation.eulerAngles.y);
    }
	// If the local player reaches a designated area while running, it triggers the quickscene. //
    void OnTriggerEnter(Collider col)
    {
        if (col.gameObject.TryGetComponent(out PlayerControllerB player))
        {
            if (player == StartOfRound.Instance.localPlayerController && !CutsceneManager.Instance.cutscenePlaying && player.isSprinting)
            {
                CutsceneManager.Instance.PlayScene(scene); // Play your Quickscene. //
            }
        }
    }
}
Syncing animations for other players (Quickscene only):
- PlayAnimationOnOtherPlayeris used to play the same animation set to other players that aren't the local player:
public void PlayAnimationOnOtherPlayer(PlayerControllerB player, List<AnimationClip> clips)
public void PlayAnimationOnOtherPlayer(PlayerControllerB _player, QuickScene _quickScene)
TIP:
PlayAnimationOnOtherPlayerhas two different option, either you use your own Quickscene or another animation set meant for third person viewing if it is needed.
- StopAnimationOnOtherPlayeris used to play the same animation set to other players that aren't the local player:
public void StopAnimationOnOtherPlayer(PlayerControllerB player)
NOTE:
There's no need for any animation set or Quickscene for this function. This function's only purpose is to stop any custom animation on other players and returning to it's default state.
IMPORTANT:
There is no networking implemented in LCCutscene. It is recommended that you make your own networking to sync animations between players.
Subscribable events:
Here's a list of events that can be subscribed within the CutsceneManager:
- OnSceneStart
- OnSceneEnd
- OnSceneTransitionIn
- OnSceneTransitionOut
TIP:
Those can be used for more complex tinkering for cutscenes. They also have no arguments since everything is accessible within the manager itself.