Jump to content

xendance

Member
  • Content Count

    599
  • Joined

  • Last visited

  • Medals

Everything posted by xendance

  1. xendance

    CCIP script for aircrafts

    You just need to define the *ccipProvider.sqf file. If you look at the example, you'll see how I have defined a _pairs data structure using the BIS_fnc_addToPairs. The key is the weapon name and the value is a function. The various functions are defined before adding them to the pairs. The main script checks the current weapon of the plane and then retrieves the correct function from the pairs data structure. That function is then called with the current plane as parameter. The return value of that function has to be the weapon muzzle location in model space. The place is passed as a parameter if you need special evaluation of the weapon position. With it you can check how much ammo the current weapon has left and so on, enabling you to switch the position depending on the ammo count for example.
  2. xendance

    Scripting Discussion (dev branch)

    Could this be improved sometime without breaking backwards compatibility? That is pretty obscure syntax for just getting boolean expressions to short circuit.
  3. xendance

    Scripting Discussion (dev branch)

    Expressions are usually evaluated from left to right, not the whole line in eager languages. When you say lazy evaluation I think of Haskell and other that kinds of languages where the compiler can reorder expressions and statements because they're lazily evaluated. That is not the case in SQF, it doesn't reorder anything. The && is just prefix notation for a function that does: && = { _a = _this select 0; //assume prefix notation _b = _this select 1; if( not _a ) exitWith { false }; if( not _b) exitWith { false }; true; }; There's no lazy evaluation involved here, the && operation (should) just "short circuit" ( http://en.wikipedia.org/wiki/Short-circuit_evaluation ), as in return immediately when _a evaluates to false.
  4. xendance

    Tanks...are you kidding me???

    OP is correct. If you're the commander of a tank, the AI driver is unable to back up when you issue a "reverse" order. It has been there since god knows when.
  5. xendance

    CCIP script for aircrafts

    I have no idea how to alter the stock aircraft HUDs. I will accept help but I'd prefer if people just forked the project on github and sent me a pull request to incorporate changes ;) I'll look into the addon version though, shouldn't be too hard.
  6. Maybe in the United States, not so much in european countries. I can tell you that the finnish approach to training new conscripts isn't breaking them down mentally and reconstructing them to be the "ultimate warrior". It's quite the opposite.
  7. xendance

    Scripting Discussion (dev branch)

    Well isn't that retarded. I did try it with extra parentheses and it didn't work. Didn't think you'd need to wrap then inside another code block :| I wouldn't call it lazy evaluation though. Short circuiting boolean operands aren't any different from having multiple return statements in a function in different branches.
  8. xendance

    Scripting Discussion (dev branch)

    Is it me or do boolean expressions no longer short circuit? isFalse = { systemChat "isfalse"; false; }; isTrue = { systemChat "istrue"; true; }; shortTest = { if(call isFalse && call isTrue) then { systemChat "shouldn't print this"; }; }; call shortTest; //prints isfalse and istrue to system chat
  9. The HEMTT trucks (at least) are invisible at great distances when the object detail setting is on normal: http://feedback.arma3.com/view.php?id=19240
  10. xendance

    CCIP script for aircrafts

    Actually with today's update the script works on stable. Updated first post to reflect this.
  11. xendance

    CCIP script for aircrafts

    Video added to first post.
  12. Any chance of getting better functioning mirrors? The resolution and FPS on the current ones is pretty awful regardless of PiP settings.
  13. xendance

    CCIP script for aircrafts

    It should be fully MP compatible. Yes, there is bit of error at vast distances (2+ km distances). I'm looking into using some other kind of method, maybe the midpoint or some else. Regarding config data, it was just trial and error and I'm pretty sure the projectile simulation in my code isn't 100% correct. See list of issues on github: https://github.com/jonimake/arma-ccip/issues?state=open
  14. xendance

    How to aim GBUs in all CAS aircraft

    Just a heads up, I released a CCIP script a while ago. You can find a sample mission workshop link in the post: http://forums.bistudio.com/showthread.php?179025-CCIP-script-for-aircrafts
  15. xendance

    CCIP script

    Released: http://forums.bistudio.com/showthread.php?179025-CCIP-script-for-aircrafts
  16. Hello I've been working on a CCIP script for aircraft since I hate the fact that no aircraft has any kind of fire control system. I plan on releasing the script for all with permissions to edit it as they see fit. But the plan is to get the script work so that it should work on all vehicles with as minimal configuration as possible. The script uses Euler's method to approximate the trajectories of projectiles, be that bullets, rockets or bombs. As I have no idea how the game engine really calculates the projectile paths, I've been basically guessing and reverse engineering the algorithm. The plan is to release this for everyone so every single modder who makes vehicles can use this in his work. Technical details: Three different solvers for CCIP, one for bullets, one for rockets and one for bombs. Uses Euler method for solving the trajectory. The script start is event based, meaning it doesn't busy-wait for a player to get into a plane. Instead uses getIn event handler for firing up the CCIP solver. Since I haven't figured out how to properly get the model space position of the currently selected weapon, the script requires a file that puts the memory point names into a pairs array (an sqf equivalent of hashmap/dictionary it seems) and returns that pairs-array. Then the script uses the currently selected weapon class name and retrieves the memory point from the pairs-array. The same file is also used to define which weapons are CCIP compatible, so it's possible to tweak this on a per vehicle class basis. The file mentioned above has to be named so that it is *vehicle class name*_ccipProvider.sqf. Example below of such file. //file name: B_Plane_CAS_01_F_ccipProvider.sqf _allowedWeapons = [ "Cannon_30mm_Plane_CAS_02_F", "Rocket_03_HE_Plane_CAS_02_F", "Rocket_03_AP_Plane_CAS_02_F", "Bomb_03_Plane_CAS_02_F"]; _gatlinInfo = "Gatling_barrels_end"; _heRocketInfo = "Rocket_2"; //right rocket _apRocketInfo = "Rocket_1"; //left rocket _bombInfo = "N/A"; _pairs = []; _pairs = [_pairs,"Cannon_30mm_Plane_CAS_02_F",_gatlinInfo,false] call BIS_fnc_addToPairs; _pairs = [_pairs,"Rocket_03_HE_Plane_CAS_02_F",_heRocketInfo,false] call BIS_fnc_addToPairs; _pairs = [_pairs,"Rocket_03_AP_Plane_CAS_02_F",_apRocketInfo,false] call BIS_fnc_addToPairs; _pairs = [_pairs,"Bomb_03_Plane_CAS_02_F",_bombInfo,false] call BIS_fnc_addToPairs; [_allowedWeapons, _pairs]; Anyhow, here's a sneak peek of how it works currently. The first video is also running the projectile path tracing script to visualize the actual trajectories. TODO: Figure out how bomb trajectories are calculated Figure out how sideAirFriction config affects rocket trajectories when they are fired during a sharp turn/bank Testing and cleaning up
  17. xendance

    Dynamic shadows possible in Real Virtuality?

    It's not moving to a new engine. Their current version of the engine is just so much different than what they started with so it deserved a new name.
  18. Sounds like you've never actually fired a machine gun. Let me tell you, your vision doesn't magically shake when you fire one.
  19. xendance

    A3A (Arma 3 Actual)

    The mod name is pretty pretentious. Who are you to say what ArmA 3 should have been?
  20. xendance

    Scripting Discussion (dev branch)

    It seems that memory points have nothing to do with it. It's just the ModelToWorld command that is messed up :| Gotta check if I can do my own model space conversion tool, need to refresh my linear algebra skills... Edit: Did a hack for it: hackForConvertingModelSpacePosToWorldSpaceBecauseBISFunctionDoesNotWork = { _model = _this select 0; _modelSpaceGunPos = _this select 1; _dirVector = _this select 2; _magnitude = vectorMagnitude [0, (_modelSpaceGunPos select 1), 0]; _vectorScaleAmount = _magnitude / (vectorMagnitude _dirVector); _vector = vectorMultiply [_dirVector, _vectorScaleAmount]; _vector = vectorAdd [visiblePositionASL _model, _vector]; _vector; }; http://cloud-3.steampowered.com/ugc/558758155460501515/F8B068674EC171B45ECAC9D3800CAE6F382F01C2/ Still gotta displace the x and z dimensions of the _vector, then it should be pretty perfect.
  21. xendance

    CCIP script

    I have bit of a problem with how ArmA 3 converts coordinate spaces and made a post about it in the dev branch scripting thread. If anyone knows what causes the issue mentioned in the post and knows how to fix it, do tell :D http://forums.bistudio.com/showthread.php?160330-Scripting-Discussion-(dev-branch)&p=2706362&viewfull=1#post2706362 Edit: Managed to make a hacky conversion function that seems to be stable during flight hackForConvertingModelSpacePosToWorldSpaceBecauseBISFunctionDoesNotWork = { _model = _this select 0; _modelSpaceGunPos = _this select 1; _dirVector = _this select 2; _magnitude = vectorMagnitude [0, (_modelSpaceGunPos select 1), 0]; _vectorScaleAmount = _magnitude / (vectorMagnitude _dirVector); _vector = vectorMultiply [_dirVector, _vectorScaleAmount]; _vector = vectorAdd [visiblePositionASL _model, _vector]; _vector; }; http://cloud-3.steampowered.com/ugc/558758155460501515/F8B068674EC171B45ECAC9D3800CAE6F382F01C2/ Still gotta displace the x and z dimensions of the _vector, then it should be pretty perfect.
  22. xendance

    Scripting Discussion (dev branch)

    Are the selectionPosition and modelToWorld commands working as they should? I'm getting some weirdness when using them with planes. The position is displaced forward in proportion to how fast it's moving (in model space) when the plane is moving. Here are some pics of it happening. The red sphere marks the position which is acquired by the following line of code: _pos = _plane modelToWorld (_plane selectionPosition _gunName); stationary: http://cloud-4.steampowered.com/ugc/558758155455082523/C1DE24648CB9B0C929E5BEC75123BC3DFEAB6583/ flying: http://cloud-3.steampowered.com/ugc/558758155455080484/7ADF1783ABB8C18606D152B6E3724B170EB406B8/ Same code, different outcome when flying. Why? Is it intended?
  23. xendance

    CCIP script

    It's supposed to be some sort of library that you can just add to your project and it'll handle itself. It provides two public client side variables that can be then used for drawing the proper reticles on the HUD for example. Currently the variables are basically the position of the estimated impact point and then a result index. The index indicates how many iterations the algorithm evaluated the flight path. It will return -1 if it hit the max iteration count before finding the impact point on ground. The max iteration count is there because I can't just iterate forever with a fixed time step or it would plummet the FPS. There is an option to enable some certain HUD elements for debugging purposes. You can enable the impact point reticle and the flight path visualization but they are very crude and not really suitable for aircraft HUDs. The script has an MIT license, which means that anyone can modify it and redistribute it if they want.
  24. I've been pondering how to get the location of the bomb launcher in airplanes in model space. The following returns the location of rocket_2 memory point of the Neophron, but how to get the location of the bomb launcher? currentPlane selectionPosition "Rocket_2" = [4.28913,-0.220851,1.06955]
  25. So is there any way to get the location of them?
×