Dizzturbed

exile vehicle repair script question

3 posts in this topic

i want to enhance the repair system on my server but struggling to grab the hitpoints right it seems. the original of exile looks like this

_availableHitpoints = (getAllHitPointsDamage _vehicle) select 0;
{
    if((_vehicle getHitPointDamage _x) > 0)exitWith
    {
        _fixable = "potato";
    };
}
forEach _availableHitpoints;

i want to check only for a specific part in this case, so i remove _availabeHitpoints

//_availableHitpoints = (getAllHitPointsDamage _vehicle) select 0;
//{
    if((_vehicle getHitPointDamage "HitLFWheel") > 0)exitWith
    {
        _fixable = "potato";
    };
//}
//forEach _availableHitpoints;

but it doesnt seem to be the correct way doing so. the rest of the file wont be executed. can anyone lend a hand here? =)

Share this post


Link to post
Share on other sites

Did you try removing the quotes around the part? When the Exile code runs the for each or w/e for _x what does the for each refer to? ( On mobile so cant look anything up, but thats where I'd start.)

Share this post


Link to post
Share on other sites

You'd have to use then instead of exitWith. The problem is that since the forEach loop is gone, exitWith is now exiting the script instead of the loop it used to be contained within.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.