Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added MidAirCrouch and CHook conditions on sh_stats.lua #263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Filipao5036
Copy link
Contributor

Wait for ARC9 to update my ass, i going to update ARC9 by myself! -Filipão

Added on the procedural stat system new conditions

  1. MidAirCrouch
    It was a condition that i needed alot in the past, now just adding here because it was just that easy to make...

//////

  1. CHook
    The CHook (She Hulk) condition is a hook related function, where you can change any stat with this condition just with a trigger of CHook.

Here a example from the weapon Ember Celica using the Hook_ConditionHook:

ATT.Hook_ConditionHook = function(self) -- ConditionHook = true

	local ply = self:GetOwner()
	
	local semblance = ply:Health() <= (ply:GetMaxHealth() / 100) * 35
	
	if semblance then
		ConditionHook = true
	else 
		ConditionHook = false
        end
end
-- If ConditionHook is true, then these stats will take effect without needing the weapon to update.
SWEP.NumAddCHook = 2
SWEP.SpreadCHook = 0.15
SWEP.RecoilMultCHook = 0.75

This works, but it can be improved.

It is recommended to have the ConditionHook on the main weapon. Since if you remove the Attachment with the hook, if the CHook condition is "true" then will still be "true", since the hook code that should disable it doesn't exist.

The stats that has CHook, its recommended to be on Attachments in case you use multiple and diferrent ConditionHook triggers.

the Hook_TranslateAnimation will recognize ConditionHook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant