bombajack

[UPDATED]EXILE 1st person in Combat mode and in vehicle

25 posts in this topic

Posted (edited)

Hello.

I have for you simple script for 1st view if is player in Combat Mode.

Its good for little bit harder server,not for MY LITTLE PONNY servers. :D

 

INSTRUCTIONS:

1.create file name viewrestriction.sqf and put it to your mission folder.

2.to viewrestriction.sqf file put this code :

 

if (!isDedicated) then {

    waitUntil {!isNull (findDisplay 46)};

    if ((difficultyOption "thirdPersonView")==1) then
    {
        while {true} do {

            waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"};

            if (ExileClientPlayerIsInCombat) then {
                player switchCamera "INTERNAL";
            };
            sleep 0.1;

         };
    };

};

or you can use second version.Second version switch 1st person view if you are in combat and if you drive vehicle:

if (!isDedicated) then {

    waitUntil {!isNull (findDisplay 46)};

    if ((difficultyOption "thirdPersonView")==1) then
    {
        while {true} do {

            waitUntil {cameraView == "EXTERNAL" || cameraView == "GROUP"};

            if (ExileClientPlayerIsInCombat) then {
                player switchCamera "INTERNAL";
            };
            sleep 0.1;

            if  (((ExileClientPlayer) == player) && (speed ( player)) >= 4.4) then {
                player switchCamera "INTERNAL";
            };
            sleep 0.1;

            if (((ExileClientPlayer)isKindOf "LandVehicle") && (speed (ExileClientPlayer)) >= 10) then {
                (ExileClientPlayer) switchCamera "Internal";
            };
            sleep 0.1;

            if (( ExileClientPlayer) isKindOf "Helicopter" && (getPosVisual (ExileClientPlayer) select 2) > 5) then {
                (vehicle player) switchCamera "Internal";
            };
            sleep 0.1;

            if ((ExileClientPlayer) isKindOf "Plane" && (speed (ExileClientPlayer)) >= 60) then {
                (ExileClientPlayer) switchCamera "Internal";
            };
            sleep 0.1;

            if (((ExileClientPlayer)isKindOf "Ship") && (speed (ExileClientPlayer)) >= 20) then {
                (ExileClientPlayer) switchCamera "Internal";
            };
            sleep 0.1;


        };
    };

};

 

3.to the initPlayerLocal.sqf put:

[] execVM "viewrestriction.sqf";

 

Original script 3rdviewRestriction from armaholic.com by Rodeostar42,edited by Bombajack.:)

THATS IT! ENJOY!

 

 

 

Edited by bombajack
6 people like this

Share this post


Link to post
Share on other sites
Advertisement

you could also save your be filters and just override the in combat toggle

Share this post


Link to post
Share on other sites

The issue with these and when your flying or driving and someone shoots near you or AI shoot and the instant camera switch into 1st.

I know this sounds silly but it caused alot of vehicle crashes haha

Share this post


Link to post
Share on other sites
20 hours ago, C][G GhostTown™ said:

The issue with these and when your flying or driving and someone shoots near you or AI shoot and the instant camera switch into 1st.

I know this sounds silly but it caused alot of vehicle crashes haha

I think its OK...simple tip...dont fly near fight :)

Share this post


Link to post
Share on other sites
38 minutes ago, bombajack said:

I think its OK...simple tip...dont fly near fight :)

Except if someone shoots at you, you're instantly in combat..

1 person likes this

Share this post


Link to post
Share on other sites
47 minutes ago, kuplion said:

Except if someone shoots at you, you're instantly in combat..

it logically....if someone fire on you ..yes-you are in combat. ;)

Share this post


Link to post
Share on other sites
4 minutes ago, bombajack said:

it logically....if someone fire on you ..yes-you are in combat. ;)

Which means you can't avoid flying over combat.. ;)

Share this post


Link to post
Share on other sites

Like Dirty said, I'd suggest as well to move it to ExileClient_object_player_event_onFiredNear.sqf. 

Also, you can add something like the following to make sure a player isn't in a vehicle... 

if (vehicle player == player) then {
	//Change to firstperson
} else {
	// Don't change
};

 

2 people like this

Share this post


Link to post
Share on other sites

Script stop working with Arma 1.58 ,any update ? tnx

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.