Raf Posted November 23, 2013 Share Posted November 23, 2013 Here is a thing I've worked the last weeks. It's a tool to be loaded at startup, and it requires MIST too, before it. It should save time for triggers and radio items creation on the mission editor. How to load it, I'm attaching a screenshot. As for how to use it, this is how it works. The script scans all the zones/groups searching for particular 'tags', basically identifiers bracketed by double-underscores, and based on the identifier used, does something specific at them. __ACTIVABLE__ : a radio item will be available to activate the group (you still need to check the LATE ACTIVATION on the group) __AIOFF__ : this group will have the AI off at script loaded __SPAWNZONE__ & __SPAWNGROUP__ : one for a zone name, another for the group name. You'll have a radio item to spawn all the spawngroups into the spawnzones, selectable. __RESPAWN__ : automatically respawns the group after a determined period of time. Example: I can create a fighter Ai group, named "__ACTIVABLE__Bandits #001", in LATE ACTIVATION, and i'll have a radio item to activate it, with no triggers to write. By default the script enables the radio items only for the red coalition, since I'm used to put game masters there, but some of the variables can be customized, just as the DEBUG variable in the screenshot. To check which, read the top of the script file.autoscript_v2.0.lua Link to comment Share on other sites More sharing options...
ENO Posted November 23, 2013 Share Posted November 23, 2013 Pretty awesome idea- I think there's some good potential there to help make things more dynamic. Question- as we talked about briefly in another thread... is this going to be broken in the MP environment what with the teleporting / cloning issues in the current version? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
Raf Posted November 23, 2013 Author Share Posted November 23, 2013 Yes, that's what I'm waiting to be fixed. It works though, and by the way, as for now at least, we're making the game master create lots of spawns at once to reduce attempts, and then disconnect/reconnect to view the new units. Will attach a sample mission too. Link to comment Share on other sites More sharing options...
Raf Posted November 23, 2013 Author Share Posted November 23, 2013 Can't edit attachments? so strange, but OK...Test.miz Link to comment Share on other sites More sharing options...
Raf Posted December 24, 2013 Author Share Posted December 24, 2013 Refactored in a more 'classy' format. At least now it should be more 'contained' and less invasive for function declaration, constants etc. Not much else, added a __SAM__ tag to add groups to IADS (if present and loaded before). And also renamed it to Automan (someone remembers that old TV series?) attaching v3.0automan_v3.0.lua 1 Link to comment Share on other sites More sharing options...
Paganus Posted December 25, 2013 Share Posted December 25, 2013 Good stuff Raf. Thanks Link to comment Share on other sites More sharing options...
Raf Posted December 25, 2013 Author Share Posted December 25, 2013 Continuing to add new 'tags'. __DEACTIVABLE__: destroys the unit __AITOGGLE__ and __HOLDABLE__ : toggles ai on/off or stop/move for convoys (depending if you want them to react or not, use the AI or HOLD types)automan_v3.3.lua Link to comment Share on other sites More sharing options...
Raf Posted December 27, 2013 Author Share Posted December 27, 2013 Added some commentary in the script, and an 'example' mission that I'm planning to use for testing... meaning that I'll include all the possible feature all at once, like a showcase, too.automan_v3.4.luaautoman_test.miz Link to comment Share on other sites More sharing options...
Midnight Posted December 28, 2013 Share Posted December 28, 2013 Very nice idea Raf, I like this. Link to comment Share on other sites More sharing options...
Xillinx Posted January 1, 2014 Share Posted January 1, 2014 (edited) Raf, Awsome job ! I do have a quick question. Does the __RESPAWN__ work with AI helicopters? I tried putting one in with a __RESPAWN__ trigger zone with the same name as the group, but he doesn't respawn when I kill him. By kill him, I set him up with no fuel and let him fall and hit some powerlines. The goal is to create a dynamic medevac mission that randomly respawns within a trigger zone so that our medevac units have something to do while the others blow stuff up. v/r (A/229) del Taco Edited January 1, 2014 by Xillinx [sIGPIC][/sIGPIC] http://1stcavdiv.conceptbb.com/ Link to comment Share on other sites More sharing options...
Raf Posted January 5, 2014 Author Share Posted January 5, 2014 Try to set the debugmode to true, and see if it triggers the 'group dead' message, and the other ones. Link to comment Share on other sites More sharing options...
Humbug Posted February 7, 2014 Share Posted February 7, 2014 I'm guessing it's not possible to restrict some groups for activation by radio to a certain coalition? I wanted to make it so red side can only activate blue fighters and vice versa. If not then I'd at least want to separate the red and blue fighter groups to different radio submenus in order to make it easier to navigate. Is this possible? Also, thanks for your great script. Link to comment Share on other sites More sharing options...
TwoLate Posted February 8, 2014 Share Posted February 8, 2014 Great script thanks. I am using this for our squad for dogfighting P-51 vs 190. I have four flights setup 1 for one plane 2 for two planes 3 for 3 planes and 4 four 4planes. I notice that when you Activate one group it drops out of the menu so if the unit dies you cant respawn the same group. Any way to set it up so you can respawn a group after the group dies beside the auto respawn? Thanks Again [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Raf Posted April 7, 2014 Author Share Posted April 7, 2014 Use the spawning function, not the activating one. Activating means that the group must be present in the mission editor statically, but in late activation, just removes the hassle to build yuor own radio item triggers. You'll have to define an area and group with the "__SPAWNZONE__" and "__SPAWNGROUP__". Link to comment Share on other sites More sharing options...
Raf Posted April 7, 2014 Author Share Posted April 7, 2014 I'm guessing it's not possible to restrict some groups for activation by radio to a certain coalition? I wanted to make it so red side can only activate blue fighters and vice versa. If not then I'd at least want to separate the red and blue fighter groups to different radio submenus in order to make it easier to navigate. Is this possible? Also, thanks for your great script. Just give them a prefix with '(blue)' and '(red)' so they're ordered alphabetically. Link to comment Share on other sites More sharing options...
Wichid Posted May 5, 2014 Share Posted May 5, 2014 This script is great but I notice it doesn't work with a couple of F-16's that I'm wanting to respawn. I have their name as __RESPAWN__F-16 Flight and they are picked up in the debugging text at the start. When they are shot down the group dead isn't shown though (possibly because they ejected?) Is there something I should do for aircraft? Lyndiman AMD Ryzen 3600 / RTX 2070 Super / 32G Ram / Win10 / TrackIR 5 Pro / Thrustmaster Warthog HOTAS & MFG Crosswind Rudder Pedals Link to comment Share on other sites More sharing options...
Wichid Posted May 5, 2014 Share Posted May 5, 2014 I've setup SU-27's and MIG-29's as SPAWNGROUP and a SPAWNZONE that F-15C can trigger via the radio menu (after changing the radio config to be available to side BLUE). It's working well so far. Thanks! Lyndiman AMD Ryzen 3600 / RTX 2070 Super / 32G Ram / Win10 / TrackIR 5 Pro / Thrustmaster Warthog HOTAS & MFG Crosswind Rudder Pedals Link to comment Share on other sites More sharing options...
gregzagk Posted June 7, 2014 Share Posted June 7, 2014 This script is great but I notice it doesn't work with a couple of F-16's that I'm wanting to respawn. I have their name as __RESPAWN__F-16 Flight and they are picked up in the debugging text at the start. When they are shot down the group dead isn't shown though (possibly because they ejected?) Is there something I should do for aircraft? Hi, same here. It seems it does not work for aircraft? "ARGO" DCS UH-1H DLC SP Campaign 373vFS DCS World squadron (Greece) - www.buddyspike.net "ARGO 2.0 Project Phoenix" UH-1H DLC Campaign - WIP Link to comment Share on other sites More sharing options...
Stonehouse Posted July 25, 2014 Share Posted July 25, 2014 I think the issue is that the event being checked is S_EVENT_DEAD where when aircraft hit the ground it's S_EVENT_CRASH. Probably you want to also respawn if the aircraft lands too which is event S_EVENT_LAND. So I've been trialling a small change which seems to make it work for aircraft. If you edit the script using Notepad ++ and scroll down to line 325 (function add_respawnable_hooks) and make it look like: if (event.id == world.event.S_EVENT_DEAD) or (event.id == world.event.S_EVENT_CRASH) or (event.id == world.event.S_EVENT_LAND) then it seems to work ok for aircraft although I've not yet tried it for ground units to see if the above breaks something. Cheers, Stoney Link to comment Share on other sites More sharing options...
Stonehouse Posted August 4, 2014 Share Posted August 4, 2014 Running into a problem with auto respawns after a longish time into a large mission. I have some recon aircraft set up with __RESPAWN__ and eventually I start to see red recon planes spawning at blue bases but seemingly with a blank name as the first symptom I got was a different script failing a nil value error on a Unit.getByName. Anyway I'll try to debug it when I have time but wondered if anyone else had seen this too? Thanks, Stonehouse Link to comment Share on other sites More sharing options...
Wrench Posted May 6, 2015 Share Posted May 6, 2015 Great Work! Is it possible to make a radio item to spawn a random group? Even better, is it possible to make it spawn a random group, and not attempt to spawn it again? That way, I could have 3 groups of enemy fighters, and spawn them in a random order, but not have it attempt to spawn the same group twice? I'd like this option for a trainging mission I'm doing where I can spawn a random group, then have to find and destroy them, then spawn the next random group. Carrier Script. Link to comment Share on other sites More sharing options...
Doum76 Posted September 2, 2015 Share Posted September 2, 2015 Hi RAF, I've dowloaded Automan, i needed to get a radio option to spawn targets, your script does it weel using the __SPAWNGROUP__ and __SPAWNZONE__ tags, using the spawn_disperse_radius = 50, my question is, i want to also be able to get spawn from the same target but at different altitude, more likley randomend, so what is the best way to go, creat a groupe for a specific aircraft, ie the IL-78, and inside this groupe creating a few units with diff altitude ans when spawning with the radio it can randmomize which unit will be spawn? Or i need to make different groups with one unit but all diff altitude? Or simply a single group or unit and there is an option like the disperse, but spawning it at random altitude? In other workds, using the ME is not that bad, but as using or creating script, this is way too complicated for me and i'm not patient enough for this :) or if you can simply type in the code which i can add to my mission with the 'DO SCRIPT' inside the ME? Thanks Link to comment Share on other sites More sharing options...
Stonehouse Posted September 2, 2015 Share Posted September 2, 2015 Unfortunately I don't think Raf is about much these days which is a shame as his coding work seems really good. You may want to PM him for a better chance of a response. If he does come back with an updated script for you I hope he makes it available here. Link to comment Share on other sites More sharing options...
FishbedBG Posted October 5, 2015 Share Posted October 5, 2015 Can somebody update this unique script to 1.5? And the other thing is that when i activate an airplane group, it either lowers to 250m and goes full AB on the waypoints, or either flies how it has to do. Any help? Link to comment Share on other sites More sharing options...
Pikey Posted October 5, 2015 Share Posted October 5, 2015 Errr, I got this working. you just need to update MIST. At least the script works for __RESPAWN__tagged units and doesn't error in 1.5. 1 ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
Recommended Posts