Jump to content


  • Posts

  • Joined

  • Last visited


Personal Information

  • Location
    French Alps

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I think your sdposV2 is wrong. It is a table of 2 values, when it should be a table of 2 indexed values (x and y) : sdposV2 = {x=sdposV3.x,y=sdposV3.z}
  2. @dimitriov there is a flaw in my script. It works if used once by each vehicle groups, but issue raise if function is used multiple times by a group (due to flags values being manually set and to the way env.mission updates points when setTask Mission is used). Here is the updated miz example (script is updated and instead of manually set flag values for wpts > 0, each wpt need to set flag value = flag value +1). test-GroundVeh-resume-route-after-setTask.miz
  3. @dimitriov I wrote the script with env.mission datas and used setTask Mission to resume route and put it in this example. (so without using mist) The vehicle enters a zone ("debut tir") that activates a triggered task (fire on point) using AI SET TASK (so this task deletes the route, and without action when the task is complete the vehicle just stands on place without resuming). 45 seconds after "debut tir" task, the function ResumeRoute is used with groupname and flagname as parameters and the vehicle resumes its route toward remaining waypoints. Only requirement, apart using the function when needed to resume, is to set flag value for waypoints > 0 (value = 1 for wpt 1 etc...) by script in advanced wpt action.
  4. You could get route from env.mission, remove points the same way with flag, and setTask Mission with updated route. I usually use Mist because of minimal workload with handy functions.
  5. @dimitriov if you want to see a working example using it (in the example - replacement of an aircraft by same aircraft but from enemy coalition to act as defection, that continues the route of previous aircraft from the point where it is spawned - I use mist.getCurrentGroupData and mist.getGroupData instead of mist.getGroupRoute, but works the same) you can download this .miz :
  6. Hi Nicolas, the only way I actually found to handle that is : - get route/WP using mist function - get trace of WP already reached using a flag (value +1 when a new WP is reached) - and resume route, updated by removing already reached WP using this little function : function GoUDRoute() GroupRoute = mist.getGroupRoute(GroupName, true) for i = 1, trigger.misc.getUserFlag(FlagName) do table.remove(GroupRoute, 1) end mist.goRoute(GroupName, GroupRoute) end Have a nice day Pierre
  7. @dFlow, your local table plane does not respect the structure of an aircraft group (or any group, even ground group), for example you have have stacked in the root ("group" datas) datas that belong to "units" ("units" must be present with numerically indexed unit(s), and units datas inside). You also gave strings to entries that need number (groupId, unitId), or other kind of not valid values (you would even better get ridd of some entries like group/unit ID, callsign, onboard num, names, and let scripting engine create unique available values when spawning). To be safe at first, you should create the plane group using mission editor in a clean mission, save mission, unzip from mission.zip the file named "mission" and open it with notepad++ to get the aircraft group table as created by mission editor. From there you could copy the group table to your script and change the datas you want to be dynamically set (spawn position/orientation, route, names, payload, options, tasks, or whatever...) and be sure you use correct values type to feed it.
  8. Hey, I just took a look and still same flags values occures. No clue what's wrong though.
  9. @Presidium and @Rudel_chw, I've tested Rudel's random number miz and I can't say why, but same numbers still happen. Attached modified miz (modified the 3 flags trigger to fire every 4 seconds, and added a time message and made the messages continuous - updated every second) I tested because my hesitation with this method was : maybe flags would still be activated with potential same numbers and detected like this before being changed, due to "switched cond" triggers being evaluated every sec. But it seems that this is not an issue, while there is another one. (unidentified, but soon or late flags are activated with same numbers) FWIW with script the 2nd and 3rd flags can only be activated with values from 1 to 10 but without value(s) of previous flag(s). Test Random Numbers-every-4-sec.miz
  10. In your example, nothing prevents results to be the same.
  11. Hi, here a script to do that (and a .miz to test -> flags are defined every 5 seconds with message that gives values) : local values = {1,2,3,4,5,6,7,8,9,10} for j = 1, 3 do local i = math.random(#values) trigger.action.setUserFlag("0"..j, values[i]) table.remove(values, i) end test-3flags-unique-rand-value-1-10.miz
  12. I think Grimes said it's better to only test the event "string", as number can change but not "string" : Here is a script example where I check for SP player/client both "pilot dead" and "killed" events (so script works when player crashes, get killed, or eject from damaged aircraft). Both can happen at same time and so desired following schedulled functions (respawn and countdown messages) can overlap. So when 1 event occures I first remove schedulled functions of probable other event :
  13. I've just checked and both following sentences work : if event.id == 20 then if event.id == world.event.S_EVENT_PLAYER_ENTER_UNIT then
  14. @ADHS I'd say you maybe try to access to respawned Unit at the same time that it is respawned. If so, put a 1 second delay after respawn before checking with "if Unit.getBy...."
  15. From supercarrier manual :"It is important not to place static objects in locations they may interfere with flight operations so test your mission thoroughly to find any problems." You can find on this page pictures of all carrier types with all slots and taxiways used by AI : DCS editor carrier spawns - DCS World Wiki - Hoggitworld.com
  • Create New...