Rewired Code Access

Diggidy

Member
Hi,

I will explain what I want to do and maybe you can tell me the best course of action.
I want to disable movement when looking at inventory or changing clothing. (probably rotate the camera as well)
Would also like to disable running and maybe equipping certain items when injured and such.

I would assume I would need access to the script that handles the Rewired input?

Thanks
 
Last edited:
You can use the state system for this:

 
You can use the state system for this:

I've been able to accomplish a few things with code and the States > Presets.
In the States > Presets
Im using Allow Positional Input = false and Allow Rotational Input = false;

In Code
//Unequip current weapon and stand
unEquip.StartEquipUnequip(-1);
if (heightChange.IsActive)
UCCLocomotion.TryStopAbility(heightChange);

But I want to disable all input like jump, equip, crouch, etc.
 
I was able to accomplish this in code, couldn't figure out how to do this with States > Presets
private void ActivateDeactivateMovement(bool onOff)
{
heightChange.Enabled = onOff;
jump.Enabled = onOff;
aim.Enabled = onOff;
}
 
Last edited:
Top