Jump to content

cervantes

Member
  • Content Count

    406
  • Joined

  • Last visited

  • Medals

Posts posted by cervantes


  1. i not see a troubls with this method.

    you not see a sqf script but a compiled script do not affect performances of games when the loop exit after execution.

    or when unit is killed.

     

    if (_sel select 0 == "HitGlass") exitwith 
    {
    _spotlight animate ["hitglass", 1];
                    
    _ExplodeArray = ["searchlight\sounds\glass.wav"];
    _Explode = selectRandom _ExplodeArray;
    playsound3d [format ["%1",_Explode], _spotlight,false, getPosASL _spotlight, 7, 1, 25];
    [_spotlight] execvm "searchlight\scripts\glass_shards.sqf";
    };

     

    EH apply in config .cpp do not compile the script same to EH add by script.

    and is only loaded for this unit.


  2. hi mate 🙂 tes that working but the EH required two elements by array element 🙂

     

    HitPart = "[(_this select 0 select 0),(_this select 0 select 5)] execvm ""\88mm\scripts\hitpart.sqf"";";

     

    that is init for a vehicle and man is considered to vehicle 😉

     

    _unit = _this select 0;
    _selelection = _this select 1;

     

    _this select 0 select 0 = _unit

    _this select 0 select 5 = selection hit 

     

    Enjoy 🙂


  3. Hi here finaly i have find a troubls ^^

     

    i have focused my search on my custom flak36 88mm scripts.

    But the troubls is caused by scripts inside the mission testing directory 😉

     

    for that mission test i spawn 2 planes and 2 pilots by script and when the 2 planes is destroyed 2 planes spawn again 🙂

    a script attached to this planes create this troubls.

     

    i removed this scripts and now my script reworking perfectly 😉

     

    Ty for your reply and try to helping me 😉

     

    if you want known more on this project you can be read

     

     

    and 

     

     

    Friendly.


  4. a cam script is optional alternative for observing the flak explosions.

    and is enabled when a flak explode.

    i try this script without and with and the result is a same 🙂

    yes the public variable is for a multiplayer game.

    Bi devs advise to use that into sqs script and for a real time informations on the network trafic.

    that fix sync of variables and get rid a retard of this informations.

     

    i observing that fix also a sync of scripts in sp gametype.

    Because this variables is awaiting by others script for selecting différents effects.

     

    im not totaly sure because i encoutering always a troubls with my developements.

    but a sheduled scripts not working in the same way on the editor and on sp or mp game.

    my old scripts worked and after one lot of updates they troubleds.

     

    that is one of mysterious issue i encountering ^^

     

    this script how you can read.

    is a shell range detection from air entities.

    and when the entitie is detected in the range the second loop is enabled and the script exit with the effects.

    after te first airplane destroying the script is disturbed the second loop not working correctly.

     

    and is not executed or the explosions do not explode on the correct position.


  5. this variable is used for select 2 effects.

    when this variable to true one other effect is apply.

    and i d'ont think that caused this troubls 😉

    the sqs script working well why d'ont use that? 😉

    is one simple check script camera.

     

    how i mean a script working but is after a first plane destroying that troubls appears.

    the variables and others scripts do not affect this troubls.

     

    i actualy limiting a numbers of my scripts for find a troubls but this script is not affected by others scripts.

    alone this script is affected by this troubls.

     

    /*

    _unit = _this select 0;
    _trigger = _this select 1;
    _effect= _this select 2;


    ?(_unit getvariable "FLAK_CAM"):exit;


    _camera = "camera" camCreate (_trigger modelToWorld [0,0,0]);
    _camera cameraEffect ["internal","back"];
    _camera camCommit 0;
    flak_CAM = _unit setvariable ["FLAK_CAM",true];
    publicVariable "flak_CAM";
    setAccTime 0.1;


    #cam2
    _camera camSetTarget _trigger;
    _camera camSetRelPos [0,38,0];
    _camera camCommit 0;
    ?!(alive _effect) or (isnull _effect):goto "exit";
    goto "cam2"


    #exit
    setAccTime 1.0;
    ~4
    player cameraEffect ["terminate","back"];
    camDestroy _camera;
    setAccTime 1.0;
    flak_CAM = _unit setvariable ["FLAK_CAM",false];
    publicVariable "flak_CAM";

    deleteVehicle _trigger;

    */

     

    simple cam script


  6. Hi here 🙂

     

    i post today for one strange issue with my flak 36 firing script.

    A script working perfectly before the first air taget is destroyed.

    when the first target is destroyed a script is totaly disturbed and not working.

     

    this issue is really strange because is one eprouved script and normaly working without issue.

     

    The EH launching is define in config

     

    Fired = "[_this select 0,_this select 6] execvm ""\88mm\scripts\88_flak.sqf"";";

     

    a script 88_flak.sqf:

     

    //_unit = _this select 0;
    //_shell = _this select 1;

     

    params ["_unit","_shell"];


    flak_shrapnels = _unit setvariable ["flak_shrapnels",false];
    publicVariable "flak_shrapnels";

    _trigger = createTrigger ["EmptyDetector", [0,0,0]];
    _trigger setTriggerStatements ["true", "", ""];
    _trigger attachTo [_shell, [0, 0, + 0.5]];


    while {alive _shell} DO
    {
    _pos = _trigger modelToWorld [0,0,0];
    _targets = _pos nearentities [["Air"],60];
    _trigger setpos (_shell modelToWorld [0,0,+ 0.5]);

    if !(alive _shell) exitwith {deleteVehicle _trigger;};
    sleep 0.1;

    if (count _Targets > 0) exitwith 
    {
       deleteVehicle _shell;
       flak_shrapnels = _unit setvariable ["flak_shrapnels",true];
       publicVariable "flak_shrapnels";
      _effect = "88mm_flak" createvehicle (_trigger modelToWorld [0,0,0]);
      //[_unit,_trigger] execvm "\88mm\scripts\shrapnel.sqf";
      [_unit,_trigger,_effect] exec "\88mm\scripts\flak88cam.sqs";
    };
    };

     

    If anyone known if this Eh is altered or while loop not correct 🙂

    help appreciating ^^


  7. This second post is for troublshooting with vehicle turret and zeroing animation source in model.cfg

    and zeroing scripting commands.

     

    i actualy use a useraction and zoom in and zoom out with shortcut for zeroing my optic animations 🙂

    inspired from sparehead dlc.

    i use this way for creating my custom turrets optics.

     

    based on a rco optic lens system i just animate my reticles with a engine animations source.

     

    of course zeroing animation source is not detected by the engine and scripting commands return always a same result.

    the muzzles is not detected corretly. and zeroing totaly ignored.

     

    a script

     

    _unit = _this select 0;

    _unit selectWeaponTurret ["88mm",[1]];

    #loop
    _muzzle = currentMuzzle (gunner (vehicle _unit));
    ;_weapon = currentWeapon (vehicle _unit);
    ;_weapon = _unit weaponsTurret [0];
    _weapon = currentWeapon (gunner _unit);
    private _currentzeroing = vehicle _unit currentZeroing [_weapon, _muzzle];
    ;_unit animate["zeroing_optic", _currentzeroing];
    _anim = _unit animationphase "zeroing_optic";


    cuttext[format["zeroing: %1,  optic anim: %2,  muzzle: %3",_currentzeroing,_anim,_muzzle],"plain down",0.6];
    ~0.5
    goto "loop";

     

    all rem values working for return the mussles and current zeroing on human units 🙂 

    but not on the vehicle turrets.

     

    sparhead dlc use one other system but why not fix that turrets troubls with a zeroing animation source ? 🙂

    for use simply the engine animation sources instead complicates  and resource-intensive ?

     

    friendly.

     

     

     


  8. Hi dear Community, always on my custom projects developements.

    i finaly finalised one of my shared project for help the developement from dlc creators and game moders.

    that contains a files for creating your 3d low poly clouds effects 😉

    i developed that particles for creating my 3d flak 36 88mm effects.

     

     

    you can be use that for creating your white and black smoke particles effects and a white puff rvmat.

    can be also used for creating your 3d sky clouds effects.

     

    eazly to use from your custom cloudets config with a spaceobject particle shape.

    low poly you can be use that with a maximum particles without affect a game fps.

     

    from sharing pleasure and help the developement of a news 3d particles effects.

     

    friendly.

     

    download link:

    https://www.dropbox.com/scl/fo/rkwape3gx6hxa5bp9ylbf/h?rlkey=grcpj9o0hfx7jk688jj8enjqn&dl=0

     

    preview:

    https://www.dropbox.com/scl/fi/jq1epw643nncud1wr1wxd/Sans-titre-1.jpg?rlkey=j0fjr9gi92lzj4yax3tbigw71&dl=0


  9. i not known why my last post is hidden and try again ^^

     

    i use that gearbox config

     

    Spoiler

         thrustDelay                = 0.2;         /// initial delay to cause lesser slip when on 1st gear - thrust goes from zero to full in this time
            brakeIdleSpeed             = 1.78;     /// under what speed (in m/s) does the brake apply for a vehicle without thrust
            maxSpeed                   = 91;         /// vehicle can go a bit over, but dramatically decreases thrust
            fuelCapacity               = 45;
            wheelCircumference         = 2.277;     /// diameter of 725

            antiRollbarForceCoef    = 0;     /// how strong is the anti-roll bar of vehicle preventing it to lose grip in turns (not any magical stuff, real ARB)
            antiRollbarForceLimit    = 0.5;     /// highest possible force of ARB
            antiRollbarSpeedMin     = 10;     /// the roll bar force gets from zero to full in range of min and max speed
            antiRollbarSpeedMax        = 80;      /// this simulates losing grip at high speed turns

            /// Gearbox and transmission  via PhysX
            idleRpm = 900; // RPM at which the engine idles.
            redRpm = 6900; // RPM at which the engine redlines.

            class complexGearbox
            {
                GearboxRatios[]    = {"R1",-3.231,"N",0,"D1",2.462,"D2",1.870,"D3",1.241,"D4",0.970,"D5",0.711};
                TransmissionRatios[] = {"High",4.111}; // Optional: defines transmission ratios (for example, High and Low range as commonly found in offroad vehicles)
                gearBoxMode        = "auto"; //gearbox can be of type: full-auto (only requires 'W' or 'S'), auto (requires shift between drive and reverse), semi-auto, manual
                moveOffGear        = 1; // defines what gear an automatic or semi-automatic gearbox will move off from stationary in. 1 by default.
                driveString        = "D"; // string to display in the HUD for forward gears.
                neutralString      = "N"; // string to display in the HUD for neutral gear.
                reverseString      = "R"; // string to display in the HUD for reverse gears.


            };

            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            /// PhysX parameters
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // <Description>: Defines simulation type of the vehicle. PhysX simulation ends with letter "x", "carx", "tankx" ...
            // <Type>: string
            // <Default>: (required)
            simulation = "carx";

            // <Description>: Defines how much dampers react to random little bumps on surface. It's only visual effect, doesn't influence drive simulation,
            // only taken into account when calculating damper animation.
            // <Type>: float
            // <Default>: 0.0
            dampersBumpCoef = 0.05;

            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Differential parameters
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // <Description>: A number of differential types are supported: 4-wheel drive with open differential, 4-wheel drive with limited slip, front-wheel drive
            // with open differential, front-wheel drive with limited slip, rear-wheel drive with open differential, rear-wheel drive with limited slip.
            // <Type>: string; acceptable values: "all_open", "all_limited", "front_open", "front_limited", "rear_open", "rear_limited"
            // <Default>: "all_limited"
            differentialType = "front_limited";

            // <Description>: Ratio of engine power that goes to front wheels out of total power for 4-wheel drive differentials.
            // Choosing a value greater than 0.5 delivers more torque to the front wheels, while choosing a value less than 0.5
            // delivers more torque to the rear wheels. This value is ignored for front-wheel drive and rear-wheel drive differentials.
            // <Type>: float
            // <Default>: 0.5
            frontRearSplit = 0.5;

            // <Description>: This is the largest possible relative difference between speed of front wheels. It helps to have outside wheels a bit faster
            // during the turns, but it prevents the faster wheel to take all the power while sliding. The power is shifted to slower wheel once the value is reached.
            // Locked differential has value of 1, the softer is the lock the greater should the value be.
            // This value is ignored except for front-wheel drive or four wheel drive with limited slip.
            // A good starting value is around 1.3.
            // <Type>:
            // <Default>:
            frontBias = 1.5;

            // <Description>: This is similar to frontBias except that it refers to the rear wheels.
            // This value is ignored except for rear-wheel drive or four wheel drive with limited slip.
            // A good starting value is around 1.3.
            // <Type>: float
            // <Default>: 1.3
            rearBias = 1.3;

            // <Description>: This value is similar to the frontBias and rearBias, except that it refers to the sum of the front wheel rotation speeds and the sum
            // of the rear wheel rotation speeds.
            // This value is ignored except for four wheel drive with limited slip.
            // A good starting value is around 1.3.
            // <Type>: float
            // <Default>: 1.3
            centreBias = 1.3;

            // <Description>: How fast is engine power distributed to the wheels. Stronger values mean more aggressive drive performance inclining to
            // slip a little while changing gears while weaker values are better for comfortable seamless ride.
            // <Type>: float
            // <Default>: 10.0
            clutchStrength = 15.0;

            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Engine parameters
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // <Description>: Power of the engine in kW.
            // <Type>: float
            // <Default>: (required)
            enginePower = 100;


            // <Description>: This is the maximum rotational speed of the engine expressed in radians per second. It could be calculated from maximum
            // engine RPM like this:
            // maxOmega = (maxRpm*2*Pi)/60.
            // <Type>: float
            // <Default>: 600 which is cca 6000 rounds per minute.
            maxOmega = 720;

            // <Description>: This is the maximum torque that is ever available from the engine. This is expressed in Newton metres.
            // <Type>: float
            // <Default>: value calculated from enginePower according to http://en.wikipedia.org/wiki/Horsepower#Relationship_with_torque
            peakTorque = 350;

            // <Description>: These three values describe internal damping of the engine. Bigger values mean greater damping. Clutch disengaged value
            // is used while shifting gears, engine interpolates between clutch engaged and full throttle values according to throttle input.
            // We tend to use slightly lower clutch engaged values because it allows cars to turn more smoothly.
            // Typical values in range (0.25,3). The simulation can become unstable with damping rates of 0.
            // <Type>: float, float, float
            // <Default>: 0.08, 2.0, 0.35
            dampingRateFullThrottle = 0.08;
            dampingRateZeroThrottleClutchEngaged = 0.35;
            dampingRateZeroThrottleClutchDisengaged = 0.35;

            // <Description>: This is a graph of peak torque versus engine rotational speed.
            // The x-axis of the curve is the relative engine speed; that is, the engine speed divided by the maximum engine speed. The y-axis of the curve is a
            // multiplier in range (0,1) that is used to scale the peak torque. It is good to keep the values in mind while setting changeGearMinEffectivity.
            // <Type>: Array[2] where i = number of samples, maximum 8;
            // <Default>: {{0.0, 0.8}, {0.33, 1.0}, {1.0, 0.8}}
            torqueCurve[] = {{0.000, 0.000}, {0.178, 0.800}, {0.250, 1.0}, {0.461, 0.900}, {0.900, 0.800}, {1.000, 0.300}};

            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Gearbox parameters
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // <Description>: Value of minimal gear effectivity to hold current gear. If there is better gear and effectivity is below this value then change gear.
            // <Range>: (0,1)
            // <Type>: Array where i = number of gears
            // <Default>: 0.95 for every value (Neutral = 0.15 Not sure how important this is but we want to kick out of neutral very quickly)
            changeGearMinEffectivity[]   = {0.95, 0.15, 0.95, 0.95, 0.95, 0.95, 0.95};

            // <Description>: The switch time describes how long it takes (in seconds) for a gear change to be completed. This needs to be set to aggresive shifting
            // or it would cause issues while trying to run aggressively (mainly during evading the enemies).
            // <Type>: float
            // <Default>: 0.01
            switchTime = 0.31;

            // <Description>: Set the latency time of the gearbox, specified in s.
            // This is used to prevent instant shifting after changing gears - there is some power loss during gear change and it could seem that
            // previous gear is better for a brief time after shifting.
            // <Type>: float
            // <Default>: 2.0
            latency = 1.0;

            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // Wheels parameters
            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            class Wheels
            {
                class LF
                {
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // General parameters
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // <Description>: Name of the bone, used for wheel and suspension animations.
                    // <Type>: string
                    // <Default>: ""
                    boneName = "wheel_1_1_damper";

                    // <Description>: If true, wheel is steerable, false - wheel is fixed.
                    // <Type>: bool
                    // <Default>: (required)
                    steering = true;

                    // <Description>: Defines if wheel is on the right or left side of the vehicle
                    // <Type>: string
                    // <Default>: "right"
                    side = "left";

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // Wheel PX parameters
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // <Description>: Center of the wheel (axis)
                    // <Type>: memory point
                    // <Default>: (required)
                    center   = "wheel_1_1_axis";

                    // <Description>: Point on the outside rim of the tire, used to calculate radius of the wheel (distance between center and boundary).
                    // <Type>: memory point
                    // <Default>: (required)
                    boundary = "wheel_1_1_bound";

                    // <Description>: This is the weight in kg of wheel including both rim and tyre.
                    // <Type>: float
                    // <Default>: 10.0
                    mass = 20;

                    // <Description>: This is the wheel's moment of inertia about the rolling axis. Smaller values result in more slips in aggresive driving
                    // while larger hamper the gain of speed. Good base to start with is this formula:
                    // MOI = 0.5 * Mass * Radius * Radius
                    // Some tweaking is needed after the computation, but it is still better than nothing.
                    // <Type>: float
                    // <Default>: 0.5 * WheelMass * WheelRadius * WheelRadius
                    MOI = 3.3;

                    // <Description>:The damping rate describes the rate at which a freely spinning wheel loses rotational speed.
                    // Values in range (0.25, 2) seem like sensible values. Experimentation is always a good idea, even outside this range.
                    // <Type>: float
                    // <Default>: 0.1
                    dampingRate = 0.5;

                    // <Description>: This is the value of the torque applied to the wheel when the brakes are maximally applied. Higher torques will lock the wheel
                    // quicker when braking, while lower torques will take longer to lock the wheel.
                    // A value of around 1500 is a good starting point for a vanilla wheel but a google search will reveal typical braking torques. One difficulty is
                    // that these are often expressed by manufacturers as braking horsepower or in "pounds inches". The values required here are in "Newton metres".
                    // <Type>: float
                    // <Default>: 2500
                    maxBrakeTorque = 2000;

                    // <Description>: This is the same as the max brake torque except for the handbrake rather than the brake. Typically, for a 4-wheeled car,
                    // the handbrake is stronger than the brake and is only applied to the rear wheels. A value of 4000 for the rear wheels is a good starting point,
                    // while a value of 0 is necessary for the front wheels to make sure they do not react to the handbrake.
                    // <Type>: float
                    // <Default>: 2*maxBrakeTorque
                    maxHandBrakeTorque = 0;

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // Wheel simulation parameters
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // <Description>: This is the direction of the suspension in the downward direction in the rest configuration of the vehicle. A vector that
                    // points straight downwards is a good starting point.
                    // <Type>: Array[3]
                    // <Default>: {0, -1, 0}
                    suspTravelDirection[] = {0, -1, 0};

                    // <Description>: This is the application point of the suspension force.
                    // <Type>: memory point
                    // <Default>: center
                    suspForceAppPointOffset = "wheel_1_1_axis";

                    // <Description>: This is almost the same as the suspension force app point except for the lateral and longitudinal forces that develop on the tire.
                    // A good starting point is to duplicate the suspension force application point.
                    // <Type>: memory point
                    // <Default>: suspForceAppPointOffset
                    tireForceAppPointOffset = "wheel_1_1_axis";

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // Suspension parameters
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // <Description>: These values describe the maximum compression and elongation in metres that the spring can support.
                    // <Type>: float
                    // <Default>: 0.15
                    maxCompression = 0.1;
                    maxDroop = 0.15;

                    // <Description>: This is the mass in kg that is supported by the suspension spring.
                    // <Type>: float
                    // <Default>: vehicleMass/numberOfWheels
                    sprungMass = 350.0;

                    // <Description>: This is the strength of the suspension spring in Newtons per metre.
                    //   springStrength = naturalFrequency * naturalFrequency * sprungMass
                    // <Type>: float
                    // <Default>: sprungMass*5,0*5,0
                    springStrength = 22600;

                    // <Description>: This describes the rate at which the spring dissipates the energy stored in the spring.
                    // Basic equiation for this is
                    //  springDamperRate = dampingRatio * 2 * sqrt(springStrength * sprungMass)
                    // where dampingRatio = 1 mean critical damping (critically damped pendulum should get back to start point in every swing)
                    // <Type>: float
                    // <Default>: 0,4*2*sqrt(springStrength*sprungMass)
                    springDamperRate = 8680;

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // Tire parameters
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    // <Description>: Increasing this value will result in the tire attempting to generate more longitudinal force when the tire is slipping.
                    // Typically, increasing longitudinal stiffness will help the car accelerate and brake. The total tire force available is limited by the
                    // load on the tire so be aware that increases in this value might have no effect or even come at the expense of reduced lateral force.
                    // <Type>: float
                    // <Default>: 10000
                    longitudinalStiffnessPerUnitGravity = 100000;

                    // <Description>: These values together describe the lateral stiffness per unit lateral slip (in radians) of the tire.
                    // <Type>: float, float
                    // <Default>: 25, 180
                    latStiffX = 25;
                    latStiffY = 18000;

                    // <Description>: These six values describe a graph of friction as a function of longitudinal slip.
                    // A good starting point for this is a flat graph of friction vs slip with these values:
                    // frictionVsSlipGraph[0][0]=0.0
                    // frictionVsSlipGraph[0][1]=1.0
                    // frictionVsSlipGraph[1][0]=0.5
                    // frictionVsSlipGraph[1][1]=1.0
                    // frictionVsSlipGraph[2][0]=1.0
                    // frictionVsSlipGraph[2][1]=1.0
                    // <Type>: Array[3][2]
                    // <Default>: {{0, 1}, {0.5, 1}, {1,1}}
                    frictionVsSlipGraph[] = {{0, 1}, {0.5, 1}, {1,1}};
                };
                class LR: LF
                {
                    boneName = "wheel_1_2_damper";
                    steering = false;
                    center   = "wheel_1_2_axis";
                    boundary = "wheel_1_2_bound";
                    suspForceAppPointOffset = "wheel_1_2_axis";
                    tireForceAppPointOffset = "wheel_1_2_axis";
                    maxHandBrakeTorque = 3000;
                    latStiffY = 180;
                    sprungMass = 190.0;
                    springStrength = 4750;
                    springDamperRate = 1760;
                };
                class RF: LF
                {
                    boneName = "wheel_2_1_damper";
                    center   = "wheel_2_1_axis";
                    boundary = "wheel_2_1_bound";
                    suspForceAppPointOffset = "wheel_2_1_axis";
                    tireForceAppPointOffset = "wheel_2_1_axis";
                    steering = true;
                    side = "right";
                };
                class RR: RF
                {
                    boneName = "wheel_2_2_damper";
                    steering = false;
                    center   = "wheel_2_2_axis";
                    boundary = "wheel_2_2_bound";
                    suspForceAppPointOffset = "wheel_2_2_axis";
                    tireForceAppPointOffset = "wheel_2_2_axis";
                    maxHandBrakeTorque = 3000;
                    latStiffY = 180;
                    sprungMass = 190.0;
                    springStrength = 4750;
                    springDamperRate = 1760;
                };
            };

    hope that help you 🙂


  10. hi Mankyle this are not really hard for working physx vehicle on arma3.

     

    the most important lod for working a amphibious vehicle is a buoyancy lod 🙂

     

    i d'ont modifiate a gearbox params from my schwimmwagen i use only a cpp waters values for simulating that 🙂

     

    and do not required to modifiate a gearbox 🙂

     

    for a boyancy and physx lod is just really important all faces its closed and convex but not required for a geometry lod 😉

     

    of course the size of boyancy lod meshs affect also a moves in water 🙂

     

    one movie for you can see that 🙂

     

    https://www.youtube.com/watch?v=za-MMB26-qc

     

    note also a properties in geo lod reversed = 1; and buoyancy = 1 and d'ont add autocenter 😉

    and the config 🙂

     

    Spoiler

    #define TEast 0
    #define TWest 1
    #define TGuerrila 2
    #define TCivilian 3
    #define TSideUnknown 4
    #define TEnemy 5
    #define TFriendly 6
    #define TLogic 7

    #define true 1
    #define false 0

    // type scope
    #define private 0
    #define protected 1
    #define public 2

    #define LockNo         0
    #define LockCadet         1
    #define LockYes         2

    #define mag_xx(a,b) class _xx_##a {magazine = a; count = b;}
    #define weap_xx(a,b) class _xx_##a {weapon = a; count = b;}
    #define item_xx(a,b) class _xx_##a {name = a; count = b;}
    #define bag_xx(a,b) class _xx_##a {backpack = a; count = b;}

    #define DEFAULT_SLOT 0
    #define MUZZLE_SLOT 101
    #define OPTICS_SLOT 201
    #define FLASHLIGHT_SLOT 301
    #define NVG_SLOT 602
    #define GOGGLE_SLOT 603
    #define HEADGEAR_SLOT 605
    #define UNIFORM_SLOT 801

    #define HMD_SLOT       616
    #define BINOCULAR_SLOT 617
    #define MEDIKIT_SLOT   619
    #define RADIO_SLOT    611

    #define VEST_SLOT      701
    #define BACKPACK_SLOT  901

    #define CanSeeRadar 1
    #define CanSeeEye 2
    #define CanSeeOptics 4
    #define CanSeeEar 8
    #define CanSeeCompass 16
    #define CanSeeAll 31
    #define CanSeePeripheral 32
    #define CanSeeRadarC CanSeeRadar+CanSeeCompass
    class DefaultEventhandlers;


    class CfgPatches
    {
         class schwimmwagen
             {
                units[] = {"schwimmwagen"};
                weapons[] = {};
                            requiredAddons[]={};
                requiredVersion = 1.0;
                            author = "Morenon Samy";
             };
    };
    //-----------------------------------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------------------------
    class CfgVehicleClasses
    {
        class Farmland
        {
        displayName = "Farmland";
        };
    };
    //-----------------------------------------------------------------------------------------------------------------------------
    class CfgFactionClasses {
        class NO_CATEGORY;
        class schwimmwagen {
        displayName = "schwimmwagen";
        priority = 100;
            icon = "\Woodlander\trap_ico.paa";
        side = 3;
         };
    };
    //-----------------------------------------------------------------------------------------------------------------------------
    class CfgSounds
    {
        class blow_out
        {
            name = "blow_out"; // Name for mission editor
            sound[] = {"\schwimmwagen\sounds\blow_out.wav", +10, 1.0,10};
            titles[] = {0, ""};
        };

     };

    //-----------------------------------------------------------------------------------------------------------------------------
    class CfgVehicles
    {
        class house;
        class Car;

        class schwimmwagen_repair_pos: house
        {
            icon = "";
            displayname = "repair pos"
            scope = 1;
            destrType=DestructMan;
            vehicleClass = "Farmland";
            reversed=false;
            model="\schwimmwagen\repairpos.p3d";

        };

        class Car_F: Car
        {
                    armorStructural= 4;    // ranges between 1 and 4.0, default 1
                    armorFuel = 1.4;    // default
                    armorGlass = 0.5;    // default
                    armorLights = 0.4;    // default 0.4 in all models.
                    armorWheels = 0.05
            armor = 32;
                    type = 0;
                    unitInfoType = "RscUnitInfo";
                    curatorInfoType = "RscDisplayAttributesVehicle";
                    hideUnitInfo = false;
                    selectionBackLights = "lightsback";
                    selectionBrakeLights = "lightsbrake";

                    class AnimationSources
                    {
                           class hidewheel
                           {
                            selection = "spare_wheel";
                           initPhase = 0.0;
                           animPeriod = 0;
                   };
                    };

            class HitPoints /// we want to use hitpoints predefined for all cars
            {
                class HitLFWheel;
                class HitLF2Wheel;
                class HitRFWheel;
                class HitRF2Wheel;
                class HitBody;
                class HitGlass1;
                class HitGlass2;
                class HitGlass3;
                class HitGlass4;
                class HitGlass5;
                class HitGlass6;
            };
            class EventHandlers;
        };

        class schwimmwagen: Car_F
        {
            vehicleClass="Farmland";
            faction = "schwimmwagen";
            model     = "\schwimmwagen\schwimmwagen";  /// simple path to model
            picture    = "\schwimmwagen\picture.paa"; /// just some icon in command bar
            Icon    = "\schwimmwagen\icon.paa"; /// icon in map
            scope = 2;
                    type = 0;
                    forceInGarage = true;
            scopeGarage = 2;
                    scopeArsenal=2;

                    canfloat = true;
                    engineEffectSpeed = 5;
                    waterFastEffectSpeed = 8;
                    waterspeedcoef = 0.2;
                    waterSpeedFactor = 2;
                    waterResistanceCoef = 0.09;
                    waterResistance = 1;/// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
                    memoryPointsLeftWaterEffect = "propeller_fx";

            side=3;
            rarityUrban = -1;
                    preferRoads = false; 
                    unitInfoType = "RscUnitInfoNoWeapon";
                    curatorInfoType = "RscDisplayAttributesVehicle";
                    hideUnitInfo = false;
            displayName = "schwimmwagen"; /// displayed in Editor
            hiddenSelections[] = {}; ///we want to allow changing the color of this selection

            terrainCoef     = 1.3;     /// different surface affects this car more, stick to tarmac
            turnCoef         = 2.5;     /// should match the wheel turn radius
            precision         = 10;     /// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
            brakeDistance     = 3.0;     /// how many internal waypoints should the AI plan braking in advance
            acceleration     = 15;     /// how fast acceleration does the AI think the car has


            fireResistance     = 5;     /// lesser protection against fire than tanks
                    armorStructural= 4;    // ranges between 1 and 4.0, default 1
                    armorFuel = 1.4;    // default
                    armorGlass = 0.5;    // default
                    armorLights = 0.4;    // default 0.4 in all models.
                    armorWheels = 0.02;
            armor             = 32;     /// just some protection against missiles, collisions and explosions
            cost            = 50000; /// how likely is the enemy going to target this vehicle

            transportMaxBackpacks     = 3; /// just some backpacks fit the trunk by default
            transportSoldier         = 3; /// number of cargo except driver

            /// some values from parent class to show how to set them up
            wheelDamageRadiusCoef     = 0.9;             /// for precision tweaking of damaged wheel size
            wheelDestroyRadiusCoef     = 0.4;            /// for tweaking of rims size to fit ground
            maxFordingDepth         = 0.5;            /// how high water would damage the engine of the car
            crewCrashProtection        = 0.25;            /// multiplier of damage to crew of the vehicle => low number means better protection
            driverLeftHandAnimName     = "drivewheel"; /// according to what bone in model of car does hand move
            driverRightHandAnimName = "drivewheel";    /// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)
                    memoryPointExhaust = "exhaust";
                    memoryPointExhaustDir = "exhaust_dir";
            class TransportItems /// some first aid kits in trunk according to safety regulations
            {
                item_xx(FirstAidKit,4);
            };

            class Exhausts
            {
                class Exhaust1 
                {
                    position     = "exhaust";          
                    direction     = "exhaust_dir";    
                    effect         = "ExhaustsEffectBig";
                };

                class Exhaust2
                {
                    position     = "exhaust2";
                    direction     = "exhaust2_dir";
                    effect         = "ExhaustsEffectBig";
                };
            };
            class Turrets{}; /// doesn't have any gunner nor commander
            class HitPoints: HitPoints
            {
                class HitLFWheel: HitLFWheel
                {
                    radius=0.2;
                    visual="wheel_1_1_hide";
                    armorComponent="wheel_1_1_hide";
                            name = "wheel_1_1_steering";
                    armor=-30;
                    minimalHit=0;
                    explosionShielding=4;
                    passThrough=0;
                };
                class HitLF2Wheel: HitLF2Wheel
                {
                    radius=0.2;
                    visual="wheel_1_2_hide";
                    armorComponent="wheel_1_2_hide";
                            name = "wheel_1_2_steering";
                    armor=-30;
                    minimalHit=0;
                    explosionShielding=4;
                    passThrough=0;
                };
                class HitRFWheel: HitRFWheel
                {
                    radius=0.2;
                    visual="wheel_2_1_hide";
                    armorComponent="wheel_2_1_hide";
                            name = "wheel_2_1_steering";
                    armor=-30;
                    minimalHit=0;
                    explosionShielding=4;
                    passThrough=0;
                };
                class HitRF2Wheel: HitRF2Wheel
                {
                    radius=0.2;
                    visual="wheel_2_2_hide";
                    armorComponent="wheel_2_2_hide";
                            name = "wheel_2_2_steering";
                    armor=-30;
                    minimalHit=0;
                    explosionShielding=4;
                    passThrough=0;
                };

                class spare_Wheel: HitLFWheel
                {
                    radius=0.2;
                    visual="spare_Wheel";
                    armorComponent="spare_Wheel";
                            name = "spare_Wheel";
                    armor=-30;
                    minimalHit=0;
                    explosionShielding=4;
                    passThrough=0;
                };

                class HitFuel             {armor=0.50; material=-1; name="palivo"; visual=""; passThrough=0.2;}; /// correct points for fuel tank, some of the damage is aFRLied to the whole
                class HitEngine         {armor=0.50; material=-1; name="engine"; visual=""; passThrough=0.2;};
                class HitBody: HitBody     {name = "body"; visual="camo1"; passThrough=0;}; /// all damage to the hull is aFRLied to total damage
                class HitGlass1: HitGlass1 {armor=0.25; name="glass1";}; /// it is pretty easy to puncture the glass but not so easy to remove it

            };

            driverAction         = driver_offroad01; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
            cargoAction[]         = {passenger_low01, passenger_generic01_leanleft, passenger_generic01_foldhands}; /// the same of all the crew
            getInAction         = GetInLow;         /// how does driver look while getting in
            getOutAction         = GetOutLow;         /// and out
            cargoGetInAction[]     = {"GetInLow"};     /// and the same for the rest, if the array has fewer members than the count of crew, the last one is used for the rest
            cargoGetOutAction[] = {"GetOutLow"};     /// that means all use the same in this case

            #include "sounds.hpp"    /// sounds are in a separate file to make this one simple
            //#include "pip.hpp"        /// PiPs are in a separate file to make this one simple
            #include "physx.hpp"    /// PhysX settings are in a separate file to make this one simple

            class PlayerSteeringCoefficients /// steering sensitivity configuration
            {
                 turnIncreaseConst     = 0.3; // basic sensitivity value, higher value = faster steering
                 turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
                 turnIncreaseTime     = 1.0; // higher value means smoother steering around the center and more sensitive when the actual steering angle gets closer to the max. steering angle

                 turnDecreaseConst     = 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
                 turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
                 turnDecreaseTime     = 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position

                 maxTurnHundred     = 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
            };

            /// memory points where do tracks of the wheel appear
            // front left track, left offset
            memoryPointTrackFLL = "TrackFLL";
            // front left track, right offset
            memoryPointTrackFLR = "TrackFLR";
            // back left track, left offset
            memoryPointTrackBLL = "TrackBLL";
            // back left track, right offset
            memoryPointTrackBLR = "TrackBLR";
            // front right track, left offset
            memoryPointTrackFRL = "TrackFRL";
            // front right track, right offset
            memoryPointTrackFRR = "TrackFRR";
            // back right track, left offset
            memoryPointTrackBRL = "TrackBRL";
            // back right track, right offset
            memoryPointTrackBRR = "TrackBRR";
    //-----------------------------------------------------------------------------------------
            class Damage /// damage changes material in specific places (visual in hitPoint)
            {
                tex[]={};
                mat[]=
                {
                    "A3\data_f\glass_veh_int.rvmat",         /// material mapped in model
                    "A3\data_f\Glass_veh_damage.rvmat",     /// changes to this one once damage of the part reaches 0.5
                    "A3\data_f\Glass_veh_damage.rvmat",        /// changes to this one once damage of the part reaches 1

                    "A3\data_f\glass_veh.rvmat",            /// another material
                    "A3\data_f\Glass_veh_damage.rvmat",        /// changes into different ones
                    "A3\data_f\Glass_veh_damage.rvmat"
                };
            };

                           class AnimationSources:AnimationSources
                           {
                           class hidewheel
                           {
                            selection = "spare_wheel";
                           initPhase = 0.0;
                           animPeriod = 0;
                   };
                    };
    //-----------------------------------------------------------------------------------------
            class Reflectors    /// only front lights are considered to be reflectors to save CPU
            {
                class LightCarHeadL01     /// lights on each side consist of two bulbs with different flares
                {
                    color[]         = {1900, 1800, 1700};        /// approximate colour of standard lights
                    ambient[]        = {5, 5, 5};                /// nearly a white one
                    position         = "LightCarHeadL01";        /// memory point for start of the light and flare
                    direction         = "LightCarHeadL01_end";    /// memory point for the light direction
                    hitpoint         = "Light_L";                /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
                    selection         = "Light_L";                /// selection for artificial glow around the bulb, not much used any more
                    size             = 1;                        /// size of the light point seen from distance
                    innerAngle         = 100;                        /// angle of full light
                    outerAngle         = 179;                        /// angle of some light
                    coneFadeCoef     = 10;                        /// attenuation of light between the above angles
                    intensity         = 1;                        /// strength of the light
                    useFlare         = true;                        /// does the light use flare?
                    dayLight         = false;                    /// switching light off during day saves CPU a lot
                    flareSize         = 1.0;                        /// how big is the flare

                    class Attenuation
                    {
                        start             = 1.0;
                        constant         = 0;
                        linear             = 0;
                        quadratic         = 0.25;
                        hardLimitStart     = 30;        /// it is good to have some limit otherwise the light would shine to infinite distance
                        hardLimitEnd     = 60;        /// this allows adding more lights into scene
                    };
                };
    //-----------------------------------------------------------------------------------------
                class LightCarHeadR01: LightCarHeadL01
                {
                    position     = "LightCarHeadR01";
                    direction     = "LightCarHeadR01_end";
                    hitpoint     = "Light_R";
                    selection     = "Light_R";
                };

            };

            aggregateReflectors[] = {{"LightCarHeadL01"}, {"LightCarHeadR01"}};
    //-----------------------------------------------------------------------------------------
      class UserActions
      {
       class repair1
       {
        onlyforplayer = 1;
        displayName = "Repair wheel";
        position = "wheel_1_1_axis";
        radius = 1.5;
        condition = "this getHit ""wheel_1_1_steering"" >= 1;";
        statement = "[this,player,""wheel_1_1_steering""] exec ""\schwimmwagen\scripts\repair.sqs""";
       };
       class repair2
       {
        onlyforplayer = 1;
        displayName = "Repair wheel";
        position = "wheel_1_2_axis";
        radius = 1.5;
        condition = "this getHit ""wheel_1_2_steering"" >= 1;";
        statement = "[this,player,""wheel_1_2_steering""] exec ""\schwimmwagen\scripts\repair.sqs""";
       };
       class repair3
       {
        onlyforplayer = 1;
        displayName = "Repair wheel";
        position = "wheel_2_1_axis";
        radius = 1.5;
        condition = "this getHit ""wheel_2_1_steering"" >= 1;";
        statement = "[this,player,""wheel_2_1_steering""] exec ""\schwimmwagen\scripts\repair.sqs""";
       };
       class repair4
       {
        onlyforplayer = 1;
        displayName = "Repair wheel";
        position = "wheel_2_2_axis";
        radius = 1.5;
        condition = "this getHit ""wheel_2_2_steering"" >= 1;";
        statement = "[this,player,""wheel_2_2_steering""] exec ""\schwimmwagen\scripts\repair.sqs""";
       };
      };
    //-----------------------------------------------------------------------------------------

            class EventHandlers: EventHandlers
            {
                init="[_this select 0] exec ""\schwimmwagen\scripts\init.sqs"";";
            };

            // Must be kept as fail-safe in case of issue with the function
            hiddenSelectionsTextures[]={"\A3\Weapons_F\Data\placeholder_co.paa"};     /// we could use any texture to cover the car
            

            };
        };
    };
     

     


  11. yes that possible i use this params for my schwimmwagen and reduce a speed to 10km in water in the config cpp class CfgVehicles.

     

     


                    canfloat = true;
                    engineEffectSpeed = 5;
                    waterFastEffectSpeed = 8;
                    waterspeedcoef = 0.2;
                    waterSpeedFactor = 2;
                    waterResistanceCoef = 0.09;
                    waterResistance = 1;/// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time

                   maxFordingDepth         = 0.5;            /// how high water would damage the engine of the car

     


  12. hi here i have not find on this forums how use hitpart event handler with config cpp.

    after one long search for working a script dammage by selection on static weapons i have encoutering the followed troubls.

     

    the arma3 engine do not implementing a basic hitpoints config for vehicle in static weapons config.

    and the config cpp with hitpoints defined not working for that reason.

    for this tutorial i use one search light static weapon.

    the config

    Spoiler

    #define TEast 0
    #define TWest 1
    #define TGuerrila 2
    #define TCivilian 3
    #define TSideUnknown 4
    #define TEnemy 5
    #define TFriendly 6
    #define TLogic 7
    #define true 1
    #define false 0
    #define private 0
    #define protected 1
    #define public 2


    class CfgPatches
    {
        class ww2_searchlight
        {
            units[] ={"ww2_searchlight"};
            weapons[] = {};
            requiredVersion = 0.1;
            requiredAddons[] = {"A3_Static_F","A3_Static_F_Gamma"};
        };
    };
    //------------------------------------------------------------------------------------  
    class CfgVehicleClasses
    {
        class MG_nest
        {
            displayName = Searchlight Nest;
                    side = 3;
        };
    };
    //------------------------------------------------------------------------------------  

    class CfgSounds {

        class glass {
            name = "Search_light_glass";
            sound[] = {"\searchlight\sounds\glass.wav", 2.000000, 2.000000,30};
            titles[] = {};
        };
    }; 
    //------------------------------------------------------------------------------------  


    class CfgVehicles
    {
        class Land;

        class LandVehicle: Land
        {
            class ViewPilot;
            class NewTurret;
        };
        class StaticWeapon: LandVehicle
        {
            class Turrets
            {
                class MainTurret;
            };
        };

        class StaticSEARCHLight: StaticWeapon
        {
            accuracy=0.12;
            cost=1000;
            threat[]={0.1,0.1,0.1};

                    class HitPoints
                    {
                      class HitTurret;

                      class HitGun;

                      class HitGlass;

                    };

            class Turrets: Turrets
            {
                class MainTurret: MainTurret
                {
                    class ViewOptics;
                    turretInfoType="RscOptics_Offroad_01";
                };
            };
        };

        class ww2_searchlight: StaticSEARCHLight
        {
            armor = 90;
            destrType=DestructMan;
                    Type=WeaponHardMounted;
            model = "\searchlight\searchlight";
            vehicleClass = MG_nest;
            displayName = Searchlight Nest;
            accuracy = 1000; /// temporary WF solution
                    collisionLight = true;
            pilotLight = true;
                    side = 3;
            scope = 2;
                    irScanRangeMin = 10;
                    irScanRangeMax = 4000;
                    irScanToEyeFactor = 5;
                    driverIsCommander = true;
            picture="\searchlight\pic.paa";
            icon= "\searchlight\pic.paa";
            editorPreview = "\searchlight\pic.jpg";
            mapSize = 7;

            class Reflectors
            {
                class Spot_Light 
                {
                    position = "light_point";
                    direction = "light_dir";
                    hitpoint = "light_point";
                    selection = "light_point";
                    color[] = {7000,7500,10000};
                    ambient[] = {70,75,100};
                    intensity = 1000;
                    size = 1;
                    innerAngle = 5;
                    outerAngle = 35;
                    coneFadeCoef = 10;//10
                    useFlare = 1;
                    flareSize = 25;
                    flareMaxDistance = 2500;
                    blinking=0;
                    dayLight = 0;
                    class Attenuation
                    {
                        start = 0;
                        constant = 0;
                        linear = 0.1;
                        quadratic = 0;
                        hardLimitStart = 800;
                        hardLimitEnd = 1000;
                    };

                };
                    };
            aggregateReflectors[] = {{"Spot_Light"}};
            class Turrets: Turrets
            {
                class MainTurret: MainTurret
                {

                                    primaryobserver = 1;
                                    commanding = 2;
                                    primarygunner = 1;
                                    hasDriver = 1;
                                    proxyIndex = 1;
                                    proxyType = "CPgunner";
                                    gunnerType="O_Soldier_F";


                                    gunBeg = "ws_muzzle";
                                    gunEnd = "ws_end";
                                    body = "ws_turret";
                                    gun = "ws_Gun";
                                    selectionFireAnim = "ws_end";
                                    animationSourceBody = "ws_turret";
                                    animationSourceGun = "ws_Gun";
                                    ejectDeadGunner = 0;
                                    gunnerName = "Searchlight";
                                    memoryPointGun = "ws_muzzle";
                                    memoryPointGunnerOptics = "eye";
                                    outGunnerMayFire = 1;
                                    inGunnerMayFire = 1;
                                    gunnerOpticsModel = "\A3\weapons_f\reticle\optics_empty";
                                    startEngine = 0;


                    minElev=0; maxElev=45; initElev=0;
                    minTurn=-180; maxTurn=+180; initTurn=0;
                    //weapons[]={"Binocular"};
                    weapons[]={"fakeweapon"};
                    magazines[]={};
                    gunnerAction = "Commander_APC_tracked_01_crv_out";
                    gunnerOpticsShowCursor = 1;
                                    lockSeekRadius = 1500; 
                    // gunnerForceOptics = true;
                    hideWeaponsGunner = true;

                    class ViewOptics: ViewOptics
                    {
                        initAngleX=0;
                        minAngleX=-30;
                        maxAngleX=30;
                        initAngleY=0;
                        minAngleY=-100;
                        maxAngleY=100;
                        initFov=0.75;
                        minFov=0.25;
                        maxFov=2.25;
                        visionMode[]=
                        {
                            "Normal"
                        };
                    };
                               //gunnerRightHandAnimName="hand_pos";
                               //gunnerLeftHandAnimName="hand_pos";
                    };
    };
            class EventHandlers
            {
             init = "[_this select 0] execvm ""\searchlight\scripts\init.sqf"";";
                     HitPart = "[(_this select 0 select 0),(_this select 0 select 5)] execvm ""\searchlight\scripts\hitpart.sqf"";";
            };
                             class HitPoints : HitPoints
                            {
                            class HitTurret : HitTurret 
                            {
                             armor = 0.3;
                             material = -1;
                             name = "ws_turret";
                             visual = "";
                             passThrough = 0;
                             displayName = "ws_turret";
                           };
                           class HitGun : HitGun
                           {
                            armor = 0.3;
                            material = -1;
                            name = "ws_Gun";
                            visual = "ws_Gun";
                            passThrough = 0;
                          };
                           class HitGlass : HitGlass
                           {
                            armor = 0;
                            material = -1;
                            name = "HitGlass";
                            visual = "HitGlass";
                            displayName = "HitGlass";
                            passThrough = 0;
                          };
                       };
            class AnimationSources
            {
                class lightflash{source="reload";weapon="fakeweapon";};
                class HitGlass{source="HitGlass";weapon="fakeweapon";};
            };
              };
         };
    };

     

    the model .cfg

     

    Spoiler


    class CfgSkeletons
    {
        class Default
        {
            isDiscrete = 1;
            skeletonInherit = "";
            skeletonBones[] = {};
        };

        class searchlight : default
        {
            skeletonBones[]= 
            {
                "Hand_pos","",
                "HitGlass","ws_Gun",
                            "light_cone","ws_Gun",

                            "ws_turret","",
                 "ws_Gun","ws_turret"
            };
        };
    };
    class CfgModels
    {
        class Default
        {
            sectionsInherit = "";
            sections[] = {};
            skeletonName = "";
        };

        class searchlight : Default
        {
            skeletonName="searchlight";
            sections[] = {"zbytek","HitGlass","Hand_pos"};
            class Animations
            {        
                class ws_Gun
                {
                    type="rotationX";
                    source="ws_Gun";
                    selection="ws_Gun";
                    axis="gun_axis";
                    animPeriod=0;
                    memory=1;
                    minValue="rad 0";
                    maxValue="rad +85";
                    angle0="rad 0";
                    angle1="rad +85";
                };

                class ws_turret
                {
                    type="rotationY";
                    source="ws_turret";
                    selection="ws_turret";
                    axis="turret_axis";
                    minValue="rad -180";
                    maxValue="rad +180";
                    angle0="rad -180";
                    angle1="rad +180";
                };

                class lightflash
                {
                    type="hide";
                    source="collisionLights";
                    selection="light_cone";
                    sourceAddress="loop";
                    minValue=0;
                    maxValue=1;
                    memory=0;
                    hideValue=0;
                    unHideValue=0.5;
                };
                class HitGlass
                {
                    type="hide";
                    source="HitGlass";
                    selection="HitGlass";
                    minValue=0;
                    maxValue=1;
                    hideValue=1;
                };
        };    
       };
    };

     

    i fix this troubls with hitpart event handler in my config.

    now we can fix the attention on the hitpart event handler because that working perfectly for detecting a selection hit 😉

    in script we need define if a selection hit is Hitglass.

    the selection is returned same to one array element for that we need return the selection array and the element in this array.

     

    the script

    Spoiler

    _spotlight = _this select 0;
    _sel = _this select 1;

    if (_sel select 0 == "HitGlass") exitwith 
    {
    _spotlight animate ["hitglass", 1];
                    
    _ExplodeArray = ["searchlight\sounds\glass.wav"];
    _Explode = selectRandom _ExplodeArray;
    playsound3d [format ["%1",_Explode], _spotlight,false, getPosASL _spotlight, 7, 1, 25];

    };
     

     

    if you use (_sel  == "HitGlass") that return one error because the element is not corectly identified but with (_sel select 0 == "HitGlass") you identify coretly the selection hited by projectiles 😉

     

    friendly Cervantes.


  13. hi here i fixed today one issue with my last particles emiter script and want share that with this amazing community 😉

     

    this script have for but to work exatly with same direction and position params  from emmiter in config bin or cpp.

    generaly we attach a particles emiters with attachto but an attached emiter can't be turn corectly with others objects 🙂

     

    a emiters define in config use generaly from position and particles directions this params and memories points:

     

     

            moveVelocity[]=
            {
                "2*directionX",
                "2*directionY",
                "2*directionZ"
            };

            position[]=
            {
                "positionX + 0.12 * directionLocalX",
                "positionY + 0.12 * directionLocalY",
                "positionZ + 0.12 * directionLocalZ"
            };

     

    of course is not eazy to write same params with script especialy for a setParticleParams and setParticleRandom.

    but that is possible :)

     

    i use in this exemple a machineguncloud FX params for simulating a overheat from mg barrel, but i disable a wind affect and invert a direction for my smoke fly on back and not on front

    and i apply a velocty of particles on the angle of my weapon direction 😉

     

    Spoiler

    _mg=_this select 0;


    _pArray = [];


    for "_i" from 1 to 1 do
    {
    _mem_pos  = _mg selectionposition ["usti hlavne", "Memory"];
    _x = _mem_pos select 0;
    _y = _mem_pos select 1;
    _Z = _mem_pos select 2;

    _pos = _mg modelToWorld [_x,_y,_z];
    _vdir = _mg weaponDirection currentWeapon _mg;
    _angle = (_vdir select 0) atan2 (_vdir select 1)-180;
    //cuttext[format["Captive: %1",_angle],"plain down",0.6];
    _smoke = "#particlesource" createVehicleLocal _pos;
    _smoke setParticleParams [["\A3\Data_F\ParticleEffects\Universal\Universal", 16, 12, 8,1],
    "", 
    "Billboard", 
    1, 
    0.80000001,
    [_x,_y,_z],// memorie point position
    [2*sin(_angle),2*cos(_angle),random 0.2 - random 0.2],  //moveVelocity
    1, 0.050000001,0.039999999, 0, 
    [0.30000001,0.69999999,1,1.2,1.4,1.6,1.8], //size
    [[0.89999998,0.89999998,0.89999998,0.079999998], [0.89999998,0.89999998,0.89999998,0.035999998], [0.89999998,0.89999998,0.89999998,0.012], [0.89999998,0.89999998,0.89999998,0.001]], 
    [1.2], 
    0.1, 
    0.050000001, 
    "", 
    "", 
    _mg,
    0.5,
    false,
    -1,
    []

    ];
    _smoke setParticleRandom [1, [0, 0, 0], [0, -1, 0], 20, 0, [0, 0, 0, 0], 0, 0, 0.5];
    _smoke setDropInterval 0.0099999998;
    _pArray pushBack _smoke;

        };

        _pArray spawn 
        {
            _pArray = _this;
            sleep 2;
            { deleteVehicle _x } foreach _pArray;
        };

     

    _mem_pos  = _mg selectionposition ["usti hlavne", "Memory"];

    normaly works but work only on editor not in multiplayer alone, for fix that i define again a position on memory point with modeltoworld 😉

    _x = _mem_pos select 0;
    _y = _mem_pos select 1;
    _Z = _mem_pos select 2;

    _pos = _mg modelToWorld [_x,_y,_z];

     

    the angle with weapon direction for apply a particles velocity directions

     

    _vdir = _mg weaponDirection currentWeapon _mg;
    _angle = (_vdir select 0) atan2 (_vdir select 1)-180;

     

    or _angle = (_vdir select 0) atan2 (_vdir select 1)

    for no invert direction.

     

    [2*sin(_angle),2*cos(_angle),random 0.2 - random 0.2], observing that math formula is same to "2*directionX","2*directionY" 😉

     

    now a particle emiter turn perfectly with a memorie point and apply a velocity of particles on realy wanted direction and position.

     

    friendly Cervantes.

    • Thanks 2

  14. hi here i have recently find one troubls with last update of arma3 and arma3 tools.

    on the old version of arma3 my customs weapons hand anims working perfectly and now that not working corectly after addon builder binarized a files.

    if you encoutering this troubls try to check that.

     

    in old arma3 tools version we work directly on P:\ drive for works a path with tools.

    now its required to copy your files directories on P:\A3

    and that fix a handanims for a custom weapons.

     


  15. yes i have also testing this damned shader ^^

     

    but you are alone actualy to find this reaction with super shader 😉

     

    but this shader do not work corectly with alpha chanels and he are totaly usless underwater and with alpha optic textures 😉

     

    i have discovering one interessant addons in steam workshop for add a pbr shader into arma3.

     

    that is one really amazing shader and that working with substance painter.

     

    but im really noob with substance painter i use that actualy with blender for unwraps my uvs and decimate polygons for my shadow volumes 😉

     

    and i have no idea how working a custom shader for arma3.

     

    i think if you really want use refract shader to work yourself a custom refract shader 😉

     

×