wesleywh / EasyMultiplayer-Invector

Where to submit issues for "Easy Multiplayer - Invector" suite of packages that is available via GumRoad or the Unity Asset Store. GUMROAD: https://cyberbulletgames.gumroad.com/ ASSET STORE: https://assetstore.unity.com/publishers/34070
0 stars 0 forks source link

Remain In Scope View After Death #3

Closed wesleywh closed 2 years ago

wesleywh commented 2 years ago

Reported in discord #emi-support channel:

The UI of the scope doesn't go away when you die while using it.
AmmarTee commented 2 years ago

Following

wesleywh commented 2 years ago

I have implemented this in my code. It's a very simple fix. For now you can do the following.

  1. Open MP_vShooterMeleeInput.cs
  2. In the start method right before: finishedInitializing = true; Add:
    GetComponent<vThirdPersonController>().onDead.AddListener(OnDeadStopAiming);
  3. Add the method OnDeadStopAiming:
    /// <summary>
    /// This will make it so you stop aiming if your character is marked as dead
    /// </summary>
    protected virtual void OnDeadStopAiming(GameObject character)
    {
    DisableScopeView();
    }

Done.

Now you will stop aiming when you die.

NOTE: The above will be included as part of the v0.3.5 release. Going to work on a few of these other bugs before releasing. Feel free to re-open this issue if this doesn't solve your issue.

AmmarTee commented 2 years ago

Thanks buddy