Jump to content

panther42

Member
  • Content Count

    774
  • Joined

  • Last visited

  • Medals

Everything posted by panther42

  1. @johnnyboy without testing, does the last note in setUnitPos help at all via setUnitCombatMode? It mentions setCombatMode, but that is for group.
  2. 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"
  3. 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.
  4. 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 !().
  5. 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.
  6. @froggyluv did you try this by removing the "hint" and just use t = str format ["This soldier's concealment level is %1",_c];?
  7. panther42

    Condition OR

    Happy to assist.
  8. 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?
  9. panther42

    CalculatePath Test Mission

    @Sertica Perhaps a bit more reading would help? KK scopes See also from KillZoneKid: Variables Three parts I also forgot, you can see this post
  10. Sorry for the multiple posts. Seems as though I had misinterpreted @madrussian previous posts. This seems like some sort of ambient combat request for reinforcements sent via AI due to trigger/scripting. Although, I'm not certain, as he/she states "encountering many gotchas trying get helis transporting AIs & player in A2".
  11. One script/mod I know which worked quite well back in the day was the Medevac Module by @goliath86. This was all AI coming to your aid, etc. If you dig into the code of this, you can use/change to your needs, of course, giving credits to @goliath86. Don't be fooled by the sqs code, as you can read a bit here: KillzoneKid. sorry, I was replying to @madrussian comments about AI transport. I may have missed the issue... @Gunter Severloh & @Rydygier, I commend your work, although I'm not a "place this module in mission" type of guy. Thumbs up on both of your work.
  12. interesting, as the code I use, I would expect the global array to be overwritten by only the two points then? see the mission I posted in a previous post. Perhaps I'm missing something? I have markers and diag_log inserted to verify route positions of the array.
  13. I do not believe I ever had issues with the "double run" bug for the event handler. Perhaps the code was updated, or wiki not updated once fixed? There may be certain instances when this happens, but I have not ran across in the testing I have done. It would be easy to identify, as the wiki states there are only two elements returned, which are both the end point.
  14. Just in case, here is a link to a quick test mission I put together. p42_calculatePath It's set up for player to ride along. Edit as you wish. View the map to see route positions. Change "end" marker to a different location, etc.
  15. @Luft08, I haven't done testing without the isNil check for adding the PathCalculated event handler to calculatePath, but I've noticed you do not use it. In the examples given previously by myself and @pierremgiin another thread, we both did. Not sure if this could be messing up your convoyPath array, but the wiki does state this in the big yellow caution box at the top of calculatePath page. Also, just to point out, convoyPath may be overwritten if the code is run in a loop. I.E. first run convoyPath count is 0, next iteration it is > 0. This would mean your statement "if(convoyPath isEqualTo []) then {...}" runs only once. This depends on where you declare convoyPath = [] in relation to the entire code/scope. If this is intent, disregard.
  16. There are other methods to path finding available, if interested. These are based on shortest road routes from point A to point B. I believe I still have some test missions for code34's OO_Pathfinding, Spiderswine's Navigation System featuring Dijkstra-Algorithm, and Rube's RUBE_findRoute & RUBE_plotRoute Rube convoy also. Note, with the Rube stuff, I've updated code, and removed folders/code which is not used.
  17. This is part of the code which I used for testing. I was using this to send cars driving back/forth from distant neighbor locations. Very similar to what you are working on. You can tweak to your variables, etc. Convoys are another animal, depending on if you set vehicles in the convoy along the route start position via your scripts also. I used to use one of Rube's convoy route scripts for all of it. Don't believe I had any issues with the Problem(s) listed in calculatePath: For some unknown reason, the "PathCalculated" Event Handler is fired twice, first with calculated path and second with array consisting of 2 elements, which are identical and are equal to the end point. See Example 3 & 4 for a workaround.
  18. You can use calculatePath to return an array of positions via the PathCalculated Event Handler. Once you have an array of positions, you can find the direction from array select 0 to array select 1, etc. "I need to know what direction a vehicle will go..." I have used this in testing for ambient civilians, driving back/forth from town to town, in conjunction with setDriveOnPath. I can dig up some code from a test mission if you would like.
  19. I suggest you read the previous tutorials I posted, and here's another: Private Special Variables These will help you understand what you inquire about. Much better to understand why things work the way they do, than to say "because person x told me so". The old proverb "Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime."
  20. If I'm reading yours correctly, you are overwriting _return each time it runs through forEach _array; You want to "add to" the existing, not overwrite, to keep array of all. Couple of points: @pierremgi script _logic = _logics select _forEachIndex; could also be just _logic = _x _return pushBack [_townArray,_miscArray]; could be _return pushBack [_x,_townArray,_miscArray]; to save reference to logic for the _townArray & _miscArray
  21. @killzone_kid also has a tutorial on variables (three parts) & scopes. In fact, if you have not visited his site, he has a lot of great information available.
  22. panther42

    Strange Error in .rpt file

    I looked back at my logs, and seems to be related to the installation of Pythia, or a coincidence of when I started running it. Do you use 7erra's Editing Extensions, which requires Pythia? Do you have the following lines listed below the destroyed lines (Not pasting all): Otherwise, you can start disabling mod-by-mod to see when the writing to the log stops for the "destroyed with lock count". It must be CBA. I removed everything but CBA, and still received the messages. Without CBA, just base game... nothing related to "destroyed with lock count"
  23. I used Mando Chute (with a bit of editing) in A2 with great success. I'm sure it would work just as well in A3. Script could be updated for newer commands, but you can build off of the idea.
  24. do NOT use createVehicle for units... You could use createVehicleCrew, or BIS_fnc_spawnVehicle, with same. Alternate: createUnit
×