Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by panther42

  1. I'm working on a proof of concept for a "fast/hot" helicopter landing using setVelocityTransformation. Could be used for planes, etc. The version I'm currently testing is using time, as given on the wiki page for setVelocityTransformation. I'm also working on a variation with distance to landing. My testing has shown helicopters will increase altitude ~ 600m out from landing point to bleed off velocity, prior to landing (of course depending on velocity prior). I start manipulating with setVelocityTransformation once they reach ~ 500m out. This is more of a glide slope landing, than a high above, drop down now, approach. My problem is that EachFrame eventHandler (addMissionEventHandler) actually moves the heliopter back at first (away from), as if the "time" captured prior to eventHandler running is not lining up with current position. Any ideas on how to correct this? May not be even possible with my approach. Set up (simplified): Of course there are other variables involved, such as utilizing time. I've done tests with t1 = time, t2 = time + x(insert value here). Used time + diag_fps, etc. Simplified version of the code used in an addAction: Any thoughts/comments would be appreciated.
  2. @sarogahtyp, thanks for the testing. It's not necessarily a test of the "other" mechanics of the script, so to speak, but a test of setVelocityTransformation in relation to use with helicopter (in this case), or possibly other aircraft. Does it work, can it work with better input numbers, is it useless... There are plenty of other methods, this is just an option. All setup, like distance from landing point to start landing, creating the landing point location, adjustment of the duration (I.E. bit too fast) would be user preference. If you set flyInHeightASL, or flyInHeight to a higher number, obviously, your approach angle will be higher/may avoid obstacles. As for the water position, this could be alleviated by simply creating a marker at your position (ASL conversion), and creating the helipad at that location, or, as you noted BIS_fnc_findSafePos/another method. Perhaps I was not "clear" enough with the title of thread "Proof of concept testing: setVelocityTransformation". I appreciate all of the testing you have done. My example was thrown together to test the application of setVelocityTransformation on aircraft, specifically helicopters. As a side note, while researching this command, I found a post by @Harzach which I thought was pretty cool. This specific post has the link to updated video.
  3. Fair enough @sarogahtyp. Paste the following in debug console:
  4. @madrussian, What about copyWaypoints, to gather prior to your takover? Copy groups WPs, and get their current, then manipulate after your done to "continue as you were"... or, as @sarogahtyp mentioned above. edit, that copyWaypoints may not work, as I expected. Must copy from one group to another, unless you cloned the original group, etc.
  5. Only way I can think of, without digging too deep, is "shoot him" before he reaches WP... 😁 I really do not think there is a way without manipulating the current WP, I.E. setCurrentWaypoint, or changing the WPs already given. I don't quite understand what you are running along side the mission creators WPs themselves:
  6. I believe it will only work if you've given multiple waypoints to begin with. You give AI multiple waypoints in script, then further in script, lockWP at one. Adding waypoint "after" the lockWP may override. There are several topics on lockWP available in search. This one from @johnnyboy may help. If you want to inhibit the execution of the waypoint statements, just change out the condition to what you want to evaluate, or the statement itself. If you change the condition from the default "true", the waypoint will not complete if your condition does not evaluate to "true". If you want to leave condition to "true" so the waypoint will complete, evaluate what you want done in your statement. Or, I've missed exactly what your intent is. I tested lockWP in the editor, no mods except CBA loaded. Works as expected. place yourself and another soldier not grouped to you in the editor. give the soldier one waypoint (close to you for testing). In that waypoint under Waypoint: Expression >> On Activation: group this lockWP true; run the scenario, and aim your cursor at the soldier once he gets to waypoint hit esc and enter the following: group cursorTarget addWaypoint [position player, 0]; LOCAL EXEC Does he move? Point your cursor at the soldier again, and hit esc. Enter the following: group cursorTarget lockWp false; LOCAL EXEC What happens? He should move to your position. You can add several waypoints to that soldier around yourself. Put lockWP true as noted above in each one. Follow above procedure to only lockWP false at each. He will not move to next waypoint until such command is given.
  7. Did anyone, even out of curiosity, try the code posted? Of course parts of it can be ripped out (chat, etc) to test. I'm interested if anyone came up with better values. I.E. instead of time, use diag_tickTime, or diag_frameNo. Some formula of fps. Too much lag for use? Not worth the time? Does using this eliminate pilots in "hot" landing zone not wanting to land? Tried on other aircraft? I was thinking planes landing at non-configured airports. I used to use parts of Mando land for A2 landing on Nimitz. I have not been able to test all situations/formulas, but am interested in any input.
  8. I've got another option for you @johnnyboy. Making use of both setWindDir (AI land into the wind) and landing script I use in personal extraction scripts. Makes use of vectorLinearConversion. Don't want to hijack @Rydygier topic, so let me know if you'd like to see. Perhaps you could try out both, and let us know which works for you. I may switch over to Rydygier's method if better (I have not tried myself)...
  9. @z1_, first of all, the code you've been posting is SQS syntax, yet you have it in an SQF script? SQF should be execVM "whatever.sqf" See SQS to SQF conversion. For a suggestion, you could try lookAt as utilized in this topic. Another option is the animationSources for the spotlight. I had a specific post in mind, but unable to locate it at this time. Ok, I found the post I was thinking about, and I doubt it will help much with this spotlight. Here's the post though, in case you need it for anything else... Another one you may give a try is by ALIAS on SW. I've never tried it, but he may not even use a spotlight item, just create a light source. Could be an option to look into these script(s).
  10. @z1_ have you looked at some of the civilian scripts by the community instead of these #$%@ modules by BIS? If not, I can give you some recommendations, or possibly modifications I've done to a couple of my favorites.
  11. panther42

    About distances

    @pierremgi I usually just use distance2D for my calculations between flying helicopter and specific point I'm using on the map. The link gives a good picture, which I'm sure you have seen. Difference? Probably only minimal.
  12. another option:
  13. @Rook Mk1, unfortunately I was just reading a forum post on this yesterday, but cannot find the exact one yet. This post may offer some information, until I, or someone else, offers the rest...
  14. @pierremgi I'm not sure you understood what I asked. I'm not looking to modify your Modules. It was a suggested request/improvement for you. Save time for user. Side>>Faction>>(Infantry/Motorized/Mechanized/etc.)>>Group Pulled from config, instead of user verifying correct config and typing/copying. Your module could provide the available options in drop downs. For instance, let me give you an example of some output from a script I was messing with: Or, better yet, @gc8 has this type of info populated in one of his projects. Should not be very difficult to implement. Just a suggestion, as I know each author has their own reasons for why they do things as they do.
  15. @pierremgi good stuff here. Have not tested completely, but any chance you could change the module to pull Faction, Type, and Specific Group from drop down via reading the config itself? I've done some testing on this myself, and seems doable, but didn't know if you've tried this, and ran into issues.
  16. Perhaps @Larrow post can help you here. See bottom section.
  17. Other option @johnnyboy, DON'T GET HIT. 😁 May be other options with selectLeader, setLeader, etc., to move command away from player, then back quickly so your AI units don't blow everything. However, If you've been hit, you're cover is already probably blown... I really only use a homebrew mod of Psycho's medical. I never noticed the same issue as you have, but should try it. I should also try @pierremgi medical, as he has some good stuff / well versed coder.
  18. @johnnyboy without testing, does the last note in setUnitPos help at all via setUnitCombatMode? It mentions setCombatMode, but that is for group.
  19. panther42

    Help with set/get variable

    @Robustcolor, @pierremgi has what you should need above. I was thinking more of running through once, and if (false) make the variable "true": { if !(_x getVariable ["Test", false]) then { _x setVariable ["Test", true]; _x setSkill 1; }; } forEach allUnits; several ways to accomplish. Above will skip the then {code} if already set to "true"
  20. panther42

    Help with set/get variable

    @Robustcolor How did you verify allUnits variable "Test" prior to running above code, and after running above code? Did you verify none of them had previous variable "Test" assigned? The first code will run, but unless a unit variable "Test" has previously been set to "true", the code in then {} should not run.
  21. panther42

    Help with set/get variable

    All you need is the second example you gave. First one is redundant in the fact you are checking if(true) then {something}. No need for == true. Also, you are NOT adding that variable to the _veh as you state. You are ONLY giving a default answer if the _veh does NOT have the variable assigned via setVariable. I.E. the returned value for if() is false. Code will not run unless you if !().
  22. I happen to have downloaded this, back when it was available, but never used it. After looking through the scripts quickly, with a program like FileLocator Lite (free)/Pro, you will find the function "fnc_RemoveWayPoints", and it being called in several other scripts. Specifically, this function is called multiple times from "fnc_GAIA_Issue orders". Not certain if your group was handed off to GAIA from the outset? This is just a quick look to give you a starting point at least. Again, I've never used this, but any help is better than none.
  23. @froggyluv did you try this by removing the "hint" and just use t = str format ["This soldier's concealment level is %1",_c];?
  24. panther42

    Condition OR

    Happy to assist.
  25. panther42

    Condition OR

    Can you explain exactly how/where you are setting Trigger5_Con & Trigger9_Con to boolean (true/false)? Within Trigger5 & Trigger9 On Activation? I suppose another option would be using triggerActivated. No need for the other variables. See the note for triggerActivated on the page linked. ((triggerActivated Trigger5 || triggerActivated Trigger9) && ["Tsk"] call BIS_fnc_taskState == "SUCCEEDED") Not tested myself, but without knowing where this boolean statement above is being checked. I.E. if () then {} statement?