Hiding Script Rect

Discuss modding questions and implementation details.
Post Reply
l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Hiding Script Rect

Post by l3lessed »

I need a little assistance. While working on the ambidexterity module, I was able to completely rebuild the fpsweapon setup with smooth animations. Now off hand attacks are fully smoothed out, like in Combat Overhaul Project.

This means, if I can disable/hide the default FPSWeapon rect/sprite, I could duplicate the ambidexterity script and make animation smoothing a completely independent mod. There would not be a need to download a separate branch for DFU to get weapon smoothing.

So, does anyone know how I would go about hiding/destroying the original object rect/sprite within the FPSWeapon script? It is currently hidden from outside object manipulation because it is not public. Is there a way I can use .AddComponent<> or .GetComponent<> to pull the rect object to hide/manipulate it?

If I could do this, I believe could build in everything else from my combat overhaul project into a stand alone mod module.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1403
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Hiding Script Rect

Post by l3lessed »

I'm an idiot some times. This is solved.

Code: Select all

                GameManager.Instance.WeaponManager.ScreenWeapon.ShowWeapon = false;    
That is all that is needed to hide the weapon but keep the script running. I just forgot I had tied the offhand render to the show weapon bool, which was causing the issue I was having.

Now, I think I can bring smooth animations to a stand alone mod.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

Post Reply