-
Posts
1745 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by toutenglisse
-
Which S_EVENT can recognize/trigger an AI loss ?
toutenglisse replied to ADHS's topic in Mission Editor
For everything that happens during the mission, the available events obviously can detect it (crash, kill, pilot dead, landing back at base, etc...). If you destroy() / deactivateGroup() by script there is no event but as your script uses these functions, you can also add anything you want for taking in account this destruction. (ex : get AI coalition before destruction, adjust counter for that coalition, and destruct) You also have the possibility to add a loop when AI spawns to periodically check if alive (MIST groupIsDead - DCS World Wiki - Hoggitworld.com or any similar function) but it's probably not what you want. Maybe if you want to share your script I can better understand your issue, but actually I can't get it. -
Which S_EVENT can recognize/trigger an AI loss ?
toutenglisse replied to ADHS's topic in Mission Editor
I don't know. I fail to understand. -
Which S_EVENT can recognize/trigger an AI loss ?
toutenglisse replied to ADHS's topic in Mission Editor
I can be wrong, but here you seem to have your event ? When you use Unit or Group.getByName():destroy(), you can also at the same time adjust your counter ? (- 1 for Unit or - #(Group.getByName():getUnits()) for a Group) -
Fast respawn upon death with script or trigger, possible or not?
toutenglisse replied to cerealex's topic in Mission Editor
Hi, you can try the script I just wrote in the mission example attached. It works only in Single Player, but with both "Player" or "Client" units, whatever the number of aircraft in your flight and your position (leader or wingman). In any of these cases : you get killed by enemy or crashed, or ejected from damaged aircraft, you and your flight get respawned after 5 seconds with a countdown message on screen. in example player is client F18c, 3rd wingman in flight. Test-respawn-player-client-SP.miz- 9 replies
-
- 1
-
-
- respawn
- mission editor
- (and 7 more)
-
@ADHS and @Flappie : I see the "issue" both in the attached mission from previous post and from a clean mission (syria / caucasus and 2 FC3 planes : Mig29A and SU27). The "issue" is that the landing event doesn't fire when the airbase is not from the same coalition or neutral AND the aircraft is a FC3 module (only tested with 2). (landing event as visible in the debrief). All is OK with a Hornet for example (landing event fires whatever the base's coalition). It seems to be a bug.
-
@ADHS Hi, you should post an example (.miz or .trk) so it is possible to take a look at it.
-
Spawning player unit with random properties [MOOSE]
toutenglisse replied to Scifer's topic in Mission Editor
@Scifer and @Kanelbolle, the simplest way is to use mist function : MIST respawnInZone - DCS World Wiki - Hoggitworld.com . It works for a "Player" unit airborne (example attached - Player respawn himself randomly in zone "1" using a F10 radio item). Other ways exist with script and much more code, using DCS and/or mist function to collect unit datas ("player" or "client", but SP), edit the datas with randomness (position, route, airborne or grounded, loadout, unit type or whayever), and then spawn "Player" unit with these modified datas. test-Player-respawn-in-zone.miz- 3 replies
-
- 1
-
-
- single-player
- dynamic
- (and 4 more)
-
Thanks @Mistermann
-
Hi, if you still need an answer, here are 2 little examples. 1 - action is : SHOW HELPER GATES FOR UNIT, settings are : unit, and flag number/name you want to be activated each time a gate is passed through. It creates gates on each unit's waypoint. 2 - action is : SHOW HELPER GATES, settings are : Point (x,y,z, as shown on map when you cycle coordinates format with left Alt + y, beware y is z, and z is altitude), heading (with a +180°/-180° format !^^). No flag is activated when gate is passed, it is just a visible gate. test-Portes.miz test-Porte-sur-point.miz
-
I've just checked that, and "AI task set - switch wpt" doesn't work with aircraft. When activated the aircraft doesn't switch wpt but immediately RTB (there is no more wpt due to set task). It does work with "AI task push - switch wpt", for both aircraft and ground units. There are several things that are complicated/obscure to us users and I can only tell you about things I think I know and their source... What is under the hood and why I don't know.
-
I say it works "as intended" based on this quote from developpers : As "AI task set" replaces everything in the AI list of tasks, then when fulfilled an AI aircraft will just RTB to nearest available airbase, and AI ground units will just stop where they stand. The "move to WP6" won't do anything as there is no more WP6. I don't say it is intuitive, even the DCS manual doesn't say anything about that : The closest explaination of this "AI task set" propertie is in the wiki.hoggit mission scripting : "Sets the task of the specified index to be the one and only active task." DCS func setAITask - DCS World Wiki - Hoggitworld.com
-
knowing the name (unique number) or the names (if made from several objects like bridge) of the target it will be more simple to use dead event and compare initiator name with target name/names (mist.flagFunc.mapobjs_dead_zones don't name-check dead map objects, but how many died in zone, how to size correctly the dynamically created zone ?...).
-
@Glloq you can apply several functions on found objects. The sample you get seems to come from getDesc() but with strange results. example attached : at mission start you get by message the description (position, life, typename etc...) of objects from a bridge (inside 'test' zone). Note that some scenery objects (including some bridges) are not found by world.searchObjects. test-sceneryDatas.miz
-
@gmangnall in fact it works "as intended" with both push and set task. With push task the ground group goes directly to last wpt when group is < 95% (see track - I changed "set" to "push" task for "group life below", deleted the "time > X" test triggers, and added an AI F16 to attack the group). With set task, group just stops because set task replaces everything, route included (the only wpt remaining is where the group is), so the group switches to its unique wpt : where it is. WP bug-mod.trk
-
I didn't answer to this question. @Nick_17 did. I told you that your trigger may be badly set up : Example attached for random to be checked only one time when unit is in zone. (on your trigger the "dice" is thrown every second that unit passes in zone = many chances to hit below 80%) test-zone-random-action.miz
-
It depends on how you set up your trigger. It can go from checking 1 time in mission (ex : "mission start", or "once" and "time > X seconds" + "time < X+1 seconds", or any condition happening only 1 time), to checking every second if random result is inside 80% until result is in (ex : "random" with no other condition or with "time > X seconds", meaning checking every second after time is more than X seconds) and in this case it will always soon or late trigger the action.
-
@hmleao you can use mist functions (Mission Scripting Tools Documentation - DCS World Wiki - Hoggitworld.com) if you want : MIST getGroupTable - DCS World Wiki - Hoggitworld.com MIST getGroupData - DCS World Wiki - Hoggitworld.com MIST getCurrentGroupData - DCS World Wiki - Hoggitworld.com
-
FWIW it can be done with script (but not with original JTAC communications).