Jump to content

toutenglisse

Members
  • Posts

    1745
  • Joined

  • Last visited

Everything posted by toutenglisse

  1. You need to use the trigger.action.outSoundForGroup(number groupId , string soundfile ) function (all units of the group will hear it - function does not exist for unit only). But you need to get the groupID of the group that is loading/unloading crates, using datas from CTLD function (I can't tell exactly where/what to get from this script)
  2. If you clone a group, only the datas of original group will be used. No way to change them. If you want to change them, you need to spawn a new group with mist.dynAdd(), instead of cloning. (change groupName if you don't want to destroy previous group at spawn) Code example to randomize headings at spawn of units of a ground group named 'test' : local GPdata = mist.getGroupData('test') for i = 1, #GPdata.units do GPdata.units[i].heading = mist.utils.toRadian(mist.random(360)) end mist.dynAdd(GPdata)
  3. Hi, with this addition to your script, it will do it for any helicopter that crashed : Handler = {} function Handler:onEvent(event) if event.id == world.event.S_EVENT_CRASH and event.initiator:getDesc()["category"] == 1 then trigger.action.outText(event.initiator:getName() .. ' crashed to the ground. ',10, true) end end world.addEventHandler(Handler)
  4. Strange, it works on my side. Here is a script example that marks all airbases with red or blue ring and a text mark that can give base name and number :
  5. I was wrong both v.mType and v.markType work Remove the first line mist.marker.add(table vars )
  6. You need to replace v.mType by v.markType
  7. I mean S_EVENT_PLAYER_ENTER_UNIT occures at the moment a player takes control of a unit. If you start as active Player there is no event (no control taken during mission because you have control at start already). Only being a late activated Player (for example 2 sec after start) or entering a client slot triggers this event. If you want to be able to refer to Player Unit, as it is done with 'initiator' of S_EVENT_PLAYER_ENTER_UNIT, you can use for example : PlayerUnit = world.getPlayer(). It will return Player's Unit that you can use for any other event. (ex : during S_EVENT_SHOT, if initiator == PlayerUnit then ....)
  8. You can just use 'fire at point' for each Wpt you want, and a stop condition of duration (30 seconds in example attached). test-AI-inf-shoot-at-Wpts.miz
  9. It depends on what you need. In your example "Mission start" seems to be enough as event (as Player exists at start). If you want S_EVENT_PLAYER_ENTER_UNIT to be detected with a Player unit, you need to late activate it (2 seconds for example), so "control taken" is detected during mission.
  10. Another thread similar to your thread : If you want to use MIST, a simple line of text will do it : (MIST must be loaded with a mission start trigger -> Do Script File) Repetitive action -> Trigger (Group Dead, Plane A) -> Action (Do Script, mist.respawnGroup('Plane A', true))
  11. With Player Unit, you are already in control at start. Only spawning in a client slot should trigger S_EVENT_PLAYER_ENTER_UNIT (detecting player taking control of a unit). S_EVENT_BIRTH works for any unit spawning.
  12. Group.getByName(AIGroupName):getController():resetTask() will make AI stop orbiting and resume route.
  13. I understand, I'll try. Have a nice day.
  14. Hi, you can use the script in my example attached. (you can play it in accelerated time to see messages when WP change) For it to work requires : 1) MIST loaded at start + a "DoScript" action where you copy the script, 2) Edit the first 2 lines to adapt the name of the group (named "test" in example) and the WP number (+1) you want to start having messages (WP 1 in example, so j = 2), 3) For each WP (in a row!) you want messages (in example : from 1 to 8 ) add an advanced action / command / script : announce(). test-heading-on-WP-change.miz
  15. I think some damage models are still w.i.p. This railroad bridge in fact has damaged model/animation for pillars, but nothing more, while the road bridge next to it has a damaged model for bridge deck.
  16. Yes, the scripted task attackGroup or attackUnit. ( DCS task attackGroup - DCS World Wiki - Hoggitworld.com ) test-Red-on-Red.miz
  17. Hi @Grimes. There's an issue in scripting wiki for "Embarking" functions. Tasks "Embarking" and "EmbarkToTransport" work (except typos : lack of last hook to close and extra space at the end of "EmbarkToTransport "), but "DisembarkFromTransport" doesn't seem to work (obsolete ?). In fact the task that does work is "Disembarking" (not documented), for Helo group controller. Example : local Embarking = { id = "Disembarking", params = { x = ClosestBase:getPoint().x, y = ClosestBase:getPoint().z, groupsForEmbarking = {CrewID}, }} AlliedPlayer:getGroup():getController():pushTask(Embarking)
  18. No, as long as these units are blue. They would be ignored if from grey/neutral coalition, but would become non-combatant. A scripted function could be tailored for whatever is required, as a laborious option.
  19. By opposition to "once" or "at mission start", this trigger does work when condition does switch (from no units to part of coalition in zone). If part of coalition is already in zone at start, the trigger won't detect a switch of condition. (If I understand correctly the case you describe)
  20. Yes files are removed except if used in mission editor. Create a hypothetical trigger (ex: flag 777 value 1618) with all your sound files listed in actions (ex: sound to all). Long to create, I don't know other way. BTW the created trigger can then be ported to other map/mission (copy/paste the code from mission.lua).
  21. Yes of course ! You should add your post to wish list. It's possible to have this within a JTAC script, and it's very usefull to have a lasing priority on detected targets. (I actually use : short range SAM/AAA > armored vehicles (MBT,IFV,Artillery) > all other vehicles > ships > statics) But you loose the complexe comms included in mission editor's FAC task for JTAC, plus script laser is static, you can update it on a calculated point relative to target but you will never have the same perfect efficiency against moving vehicles.
  22. I think it's the only way that can "match" what you need. When you load a static tamplate of an aircraft carrier with its linked statics and aircraft, you can then move it wherever you want on the map (click an hold mouse button on aircraft carrier icon and move it, all linked units/statics will keep their position on the carrier). You can load and place 5 if you want. But you need 1 template per map as it also save position/path on the map so not compatible between maps. Here picture of the same static template of A/C loaded 2 times, 1 being slightly moved away. A group template can only take units from the same group, impossible to include linked statics.
  23. You create AI actions in the group's panel by using button with this icon : Then they appear in the dropdown list of AI task push/set.
×
×
  • Create New...