Sign in to follow this  
McDaggart

Water and Autorun

8 posts in this topic

in this file

ExileClient_system_autoRun_canAutoRun

is

Spoiler

/**
 * ExileClient_system_autoRun_canAutoRun
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_canAutoRun"];
_canAutoRun = true;
try
{
 if !((vehicle player) isEqualTo player) then
 {
  throw false;
 };
 if (surfaceIsWater (getPos player)) then
 {
  throw false;
 };
 if ((damage player) >= 0.5) then
 {
  throw false;
 };
 if ((stance player) isEqualTo "UNDEFINED") then
 {
  throw false;
 };
}
catch
{
 _canAutoRun = false;
};
_canAutoRun

Could

 if !((vehicle player) isEqualTo player) then
 {
  throw false;
 };

be turned into check if in a vehicle but if its a boat its ok? (iskindof) "boat" or "ship"

 

and just uncomment out this bit to autoswim?


 if (surfaceIsWater (getPos player)) then
 {
  throw false;
 };

 

the aim is to autorun or autodrive whilst in a boat and whilst swimming, many thanks,

Edited by McDaggart

Share this post


Link to post
Share on other sites
Advertisement

thanks for reply, ive got this

Spoiler

/**
 * ExileClient_system_autoRun_canAutoRun
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_canAutoRun"];
_canAutoRun = true;
try 
{
if((vehicle player) !(isKindOf "Ship"))  then 
    {
        throw false;
    };
    if ((damage player) >= 0.5) then 
    {
        throw false;
    };
    if ((stance player) isEqualTo "UNDEFINED") then 
    {
        throw false;
    };
}
catch 
{
    _canAutoRun = false;
};
_canAutoRun

but if throws this in rpt file....

Spoiler

18:17:56 Error in expression <utoRun = true;
try 
{
if(vehicle player !(isKindOf "Ship"))  then 
{
throw false>
18:17:56   Error position: <!(isKindOf "Ship"))  then 
{
throw false>
18:17:56   Error Missing )
18:17:56 File mpmissions\__cur_mp.Altis\ExileClient_system_autoRun_canAutoRun.sqf, line 16
18:17:56 Error in expression <utoRun = true;
try 
{
if(vehicle player !(isKindOf "Ship"))  then 
{
throw false>
18:17:56   Error position: <!(isKindOf "Ship"))  then 
{
throw false>
18:17:56   Error Missing )
18:17:56 File mpmissions\__cur_mp.Altis\ExileClient_system_autoRun_canAutoRun.sqf, line 16

missing a bracket somewhere, im trying to say

if player in vehicle (but in a ship is ok) throw false

so the script would allow you to press "0" to auto run if your in a boat/ship but not aircraft or car !?

Share this post


Link to post
Share on other sites
Spoiler

private["_canAutoRun"];
_canAutoRun = true;
try 
{
if(!(vehicle player isKindOf "Ship")) then
    {
        throw false;
    };
    if ((damage player) >= 0.5) then 
    {
        throw false;
    };
    if ((stance player) isEqualTo "UNDEFINED") then 
    {
        throw false;
    };
}
catch 
{
    _canAutoRun = false;
};
_canAutoRun

this one doesnt show up in rpt file but autorun doesnt work on foot or in car, but havent tested it any further,

would it be a seperate check for each type of vehicle?

is player in car=false

is player in air=false

so is player in boat=true but not not needed as default is true?

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.