Running AIM problem

Support for MFPS 2.0 (for verified users)
Forum rules
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
Post Reply
User avatar
Suraj02
Member
Member
Posts: 16
Joined: Wed Jul 08, 2020 4:39 pm

Hey I want my character to AIM while running. In Code's description, it says just remove "!controller.run" of the condition I am not getting where is "!controller.run" The hole code start with controller and ends with Running. i try to delete "!" and replace it with "=" but in idle aim is not working.
Please help me to edit it..

Code: Select all

public bool m_CamAim
    {
        get
        {
            bool can = false;
            if (CanAim && controller.State != PlayerState.Running)
            {
                can = true;
            }
            return can;
        }
    }
    /// <summary>_
    /// determine is we can reload
    /// TIP: if you want to have to shoot when running
    /// just remove "!controller.run" of the condition
    /// </summary>
User avatar
Suraj02
Member
Member
Posts: 16
Joined: Wed Jul 08, 2020 4:39 pm

public bool m_CamAim
{
get
{
bool can = true;
if (CanAim && controller.State == PlayerState.Running)
{
can = true;
}
return can;
}
}

Hey, I just Changed the code like that, and currently working as i wanted. Is it the correct procedure? Please let me know
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

With that change, you probably wouldn't be able to aim when the player is idle or walking,
what you need is:

Code: Select all

public bool m_CamAim
    {
        get
        {
           return CanAim;
        }
    }
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Suraj02
Member
Member
Posts: 16
Joined: Wed Jul 08, 2020 4:39 pm

Working like a charm... Thank you that's what i wanted to do. Only "CamAim" thank you

but it seems both the codes working https://vimeo.com/455191999
User avatar
Bunny
New Member
New Member
Posts: 1
Joined: Wed Oct 28, 2020 11:20 pm

Hey , i am a Complete Beginner to Coding and this player controller script have 900 lines of code . i need aim while run . i dont understand where should i add this code
public bool m_CamAim
{
get
{
return CanAim;
}
}
i need help
Post Reply