Jump to content

Nicoman35

Member
  • Content Count

    63
  • Joined

  • Last visited

  • Medals

Posts posted by Nicoman35


  1. Hi there people.

    I made a mod for a vehicle parachute. Players are able to attach paracutes to vehicles, then slingload and drop them.

    I made a loop with a 'sleep' command to simulate braking of the load from free fall speed to parachute glide speed.

    Works well in test surroundings. But as soon as server load gets higher, vehicles begin to get destoryed on account of high speed impacts in ground.

    I suspect the sleep command is the culprit. Any idea of a failsafe solution when server is at high load?


  2. I got a math problem regarding my vehicle paradrop.

    I simulate the fall break of the parachute by gradually reducing it's velocity.

    The fall break distance is influenced by vehicle mass and vehicle velocity the moment the parachute is opened.

    I know, that the vehicle will reach terminal velocity when falling for about 1200 m.

    Dependent on vehicle mass,  the opening height MUST occur at a height of 120 m to 900 m above ground.

    But this is only valid, if the vehicle is alreay falling with terminal velocity, meaning it was already falling for 1200 m.

    If the distance from releasing of the vehicle to parachute opening is less than 1200 m, vehicle's velocity will be lower than terminal vlocity.

    My target is: Deploying the paracute early enough, so that the vehicle does not hit the ground with high speed, but not too early, as vehicles floating several hundred meters above ground is not too good.

     

    What I got so far:

    private _vehicleMass = getMass _vehicle;
    private _deployHeight = round(((_vehicleMass / 1000) max 1) * 120) min 900;  					// 120 - 900
    _deployHeight = (((((getPos _vehicle #2 - _deployHeight) min 1200) / 1200) min 1) max 0.3) * _deployHeight;		// fail

    Anyone got a solution?

    If you need more info, here is the gitHub link to my current work.


  3. I am in the editor, a few vehicles around me.

    I point at one vehicle and I local exec this via debug console:

     

    TeleportUp = {
    	params [["_vehicle", objNull]];
    	_vehicle setPos (getPos _vehicle vectorAdd [0 ,0, 500]);
    	while {getPos _vehicle #2 > 15} do {
    		hintsilent str (velocity _vehicle #2);
    		sleep 0.1;
    	};
    }; 
    [cursorObject] spawn TeleportUp;

    Question: Why does the vehicle take no damage, when hitting the ground?


  4. I am thinking about making an action allowing the player to attach a parachute to a vehicle. I would like to use the bergen backpack as 'container' for the visual representation. 

    Problem: How do I find an attach point automatically for any kind of vehicle, so that the look would make sense. It should look more like this

    https://www.mediafire.com/view/qep962tjtznudmw/1.jpg/file

    And not like this

    https://www.mediafire.com/view/vzhk4j6fq3n9d1a/2.jpg/file

     

    Has anyone made a nice funktion for such a purpouse already?


  5. I made a mission event handler, which I add to every single infantry unit:

    ["CAManBase", "GetInMan", {
    	params ["_unit"];
    	if ([_unit] call NIC_GRP_fnc_CheckAddActionGRP) then {[_unit] call NIC_GRP_fnc_AddActionGRP};
    }, true] call CBA_fnc_addClassEventHandler;

    It is located in an init script, which is called via config, like so:

      file = "GRParadrop\functions";
      class GRPInit {
      preInit = 1;
      };

    It adds an action for units inside helicopters and alike. The action works well with one exception. Units, which are already aboard a vehicle when the mission starts, do not have the action. Funny thing is: Those units check for the action conditions. And the condition turns true for those units. But the action is not to be seen. Unless I order those units to disembark and reembark the vehicle. I also tried to aditionally add an init event:

    ["CAManBase", "init", {
    	params ["_unit"];
    	if ([_unit] call NIC_GRP_fnc_CheckAddActionGRP) then {[_unit] call NIC_GRP_fnc_AddActionGRP};
    }, true] call CBA_fnc_addClassEventHandler;

    But it does not work either. Action is only available for units getting into vehicles AFTER mission start.

    How do I make it, that the action is available for units already aboard a vehicle when mission starts?


  6. Following problem: The 40mm GMC launcher has a max range of 1500m. At rages up to... 300 to 400 m, all works well. You lase the range, the ballistics computer adjusts the weapon and the 40 mm grenade will hit the target with high accuracy. But - the further away the target is, let's say 1000m, the grenades will constantly fall short. No matter the elevation of the target. At 1500m, the max range the grenades will fall waaaay lower than the current crosshair position. My question: Is it somehow possible to adjust the elevation of the barrel in a way the grenades will impact the point the crosshair aims to? Maybe with some kind of range dependent offset?


  7. Thanks for suggestion, pierremgi. Just testing this:

    arrow = "Sign_Arrow_F" createVehicle [0,0,0];
    onEachFrame {
    	_pos = lineIntersectsSurfaces [
    		AGLToASL positionCameraToWorld [0,0,0], 
    		AGLToASL positionCameraToWorld [0,0,5000], 
    		player,
    		objNull,
    		true,
    		1,
    		"VIEW",
    		"NONE"
    	];
    	if (count _pos == 0) exitWith {arrow setPosASL [0,0,0]};
    	arrow setPosASL (_pos #0 #0);
    	arrow setVectorUp (_pos #0 #1);
    	hintSilent str _pos;
    };

    Works good for 3. person, but in tactical view, I still do not get the cursor position. Any idea how to get cursor pos in tactical view?

×