-
Posts
1745 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by toutenglisse
-
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)
-
How to change heading of a spawned unit via script ? (mist)
toutenglisse replied to winghunter's topic in Mission Editor
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) -
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)
-
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 ....)
-
Infantery move on, then fire, then move on again
toutenglisse replied to vctpil's topic in Mission Editor
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 -
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))
- 1 reply
-
- 1
-
-
Group.getByName(AIGroupName):getController():resetTask() will make AI stop orbiting and resume route.
- 1 reply
-
- 1
-
-
Scripting issue with "Embarking" functions
toutenglisse replied to toutenglisse's topic in Mission Editor Bugs
I understand, I'll try. Have a nice day. -
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
-
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.
-
Yes, the scripted task attackGroup or attackUnit. ( DCS task attackGroup - DCS World Wiki - Hoggitworld.com ) test-Red-on-Red.miz
-
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)
-
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).
-
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.
-
How to make group template containing ships and statics
toutenglisse replied to dresoccer4's topic in Mission Editor
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. -
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.