CrazyJohny Posted August 21, 2016 Posted August 21, 2016 Hello guys. Im trying to make mission where ground late activated group gets respawned once it is destroyed. Im using mist scripting and few triggers for it. Unfortunately, it is not working Triggers activates as intended, script probably engages too but does nothing. No error message, neither any action. After searching on google, here on forums, hoggit wiki and i dont know where else i cant figure out what is wrong. Can someone try to tell me what is wrong by looking on attached screenshots of trigger chain? Mi8 pilot of [VODKA] squadron
Wrecking Crew Posted August 21, 2016 Posted August 21, 2016 That group is only going to die once, a Switched Condition event type won't help. I believe that when it gets spawned it comes in under a new group name. What are all of your Continuous Action events for?; these are going to put a load on your mission's performance. I take a regular-events approach to spawning. See this mission (DCS v1.5). Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
CrazyJohny Posted August 21, 2016 Author Posted August 21, 2016 Hmmm, this is not much helpfull as you are managing respawning by exploding remaining group units and activating new group if i decoded correctly from that bambilion of triggers :) To clear out what i want to achieve: Once coalition is owner of given zone ( part of coalition in zone ) i want a group of tanks to spawn. Once they get killed and coalition still holds zone i want to spawn that group again, and then again and again and again until coalition loose hold of zone. I dont want bambilion of groups and activate them once previous one dies. According on what i found on internet lua functionfor mist i have on screenshot should do this. It doesnt. But it does not pop up any error message. Probably you are right with name change of dead grp... :/ Mi8 pilot of [VODKA] squadron
ESAc_matador Posted August 21, 2016 Posted August 21, 2016 Hmmm, this is not much helpfull as you are managing respawning by exploding remaining group units and activating new group if i decoded correctly from that bambilion of triggers :) To clear out what i want to achieve: Once coalition is owner of given zone ( part of coalition in zone ) i want a group of tanks to spawn. Once they get killed and coalition still holds zone i want to spawn that group again, and then again and again and again until coalition loose hold of zone. I dont want bambilion of groups and activate them once previous one dies. According on what i found on internet lua functionfor mist i have on screenshot should do this. It doesnt. But it does not pop up any error message. Probably you are right with name change of dead grp... :/ Use this. mist.cloneGroup http://wiki.hoggit.us/view/CloneGroup
FlightControl Posted August 26, 2016 Posted August 26, 2016 Using MOOSE: GROUP:FindByName( "GroupName" ):ReSpawn() [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
predattak Posted August 27, 2016 Posted August 27, 2016 (edited) There is a simple solution for you with MIST, here let's say you want to make a MiG-23 to fight you and respawn when you killed him and so on. In the editor place the enemy mig group add the flight path and all (for some reason the script works if there is 1 unit per group so don't put 2 units in one group or the group will spawn but do nothing .. just fly. If you want to add 2 migs add 2 groups) i will name the mig group for this example mig1 Go to scripts and make the first script MIST activation TYPE - mission start | CONDITIONS - none or time less than x | ACTIONS - do script file (last version of MIST.lua) Now make the respawn script for the mig group TYPE - continuous action | CONDITIONS - none | ACTIONS - do script (add this) if not Group.getByName('mig1') then mist.respawnGroup('mig1', true) end DONE Another thing , do not use later activation on the units you want to respawn (or else they will just do nothing just like if you add more than 1 unit per group) Save and try it .. to all ppl around here if this is a horrible way please don't swear me or anything i'm a scripting NOOB so ... Edited August 28, 2016 by predattak
Delta59R Posted February 24, 2019 Posted February 24, 2019 There is a simple solution for you with MIST, here let's say you want to make a MiG-23 to fight you and respawn when you killed him and so on. In the editor place the enemy mig group add the flight path and all (for some reason the script works if there is 1 unit per group so don't put 2 units in one group or the group will spawn but do nothing .. just fly. If you want to add 2 migs add 2 groups) i will name the mig group for this example mig1 Go to scripts and make the first script MIST activation TYPE - mission start | CONDITIONS - none or time less than x | ACTIONS - do script file (last version of MIST.lua) Now make the respawn script for the mig group TYPE - continuous action | CONDITIONS - none | ACTIONS - do script (add this) if not Group.getByName('mig1') then mist.respawnGroup('mig1', true) end DONE Another thing , do not use later activation on the units you want to respawn (or else they will just do nothing just like if you add more than 1 unit per group) Save and try it .. to all ppl around here if this is a horrible way please don't swear me or anything i'm a scripting NOOB so ... Thank you, I followed this and it works perfectly. Meshify C w Noctua Fans, MSI Carbon Z790, 13900KS, 64gb 7200 Gskill, MSI 4090, MSI 240, Sam 1tb m2, Sam 2tb m2, Seasonic 1000w, MSFF2 Stick + X56 Throttle, HP Reverb G2, Sony 83in A90J OLED
GrEaSeLiTeNiN Posted June 10, 2019 Posted June 10, 2019 There is a simple solution for you with MIST, here let's say you want to make a MiG-23 to fight you and respawn when you killed him and so on. In the editor place the enemy mig group add the flight path and all (for some reason the script works if there is 1 unit per group so don't put 2 units in one group or the group will spawn but do nothing .. just fly. If you want to add 2 migs add 2 groups) i will name the mig group for this example mig1 Go to scripts and make the first script MIST activation TYPE - mission start | CONDITIONS - none or time less than x | ACTIONS - do script file (last version of MIST.lua) Now make the respawn script for the mig group TYPE - continuous action | CONDITIONS - none | ACTIONS - do script (add this) if not Group.getByName('mig1') then mist.respawnGroup('mig1', true) end DONE Another thing , do not use later activation on the units you want to respawn (or else they will just do nothing just like if you add more than 1 unit per group) Save and try it .. to all ppl around here if this is a horrible way please don't swear me or anything i'm a scripting NOOB so ... I tried this but I get errors (see screenshots). I would like to simply respawn aircraft that have been destroyed. I found the wikihoggit respawn script instructions and used them but they gave me this error... What am I missing or is there an updated script? Thanks! AMD Ryzen 5 5600X | Gigabyte RTX 3070 Gaming OC 8GB | 64GB G.SKILL TRIDENT Z4 neo DDR4 3600Mhz | Asus B550 TUF Plus Gaming | 2TB Aorus Gen4 TM Warthog HOTAS | TrackIR 5 | Windows 10 Home x64 | My HOTAS Profiles
Hardcard Posted June 10, 2019 Posted June 10, 2019 (edited) @GrEaSeLiTeNiN Lua is case sensitive, you wrote that "If" with a capital "I", that's invalid syntax: [color="Blue"]--This is incorrect:[/color] [color="Red"][b]If[/b][/color] not Group.getByName('Su-33 1') then mist.respawnGroup('Su-33 1', true) end [color="Blue"]--This is correct:[/color] [color="Green"][b]if[/b][/color] not Group.getByName('Su-33 1') then mist.respawnGroup('Su-33 1', true) end Also, that's MIST code, which means that you need to run MIST first. Download mist_4_3_74.rar, then extract the file mist_4_3_74.lua from it. You'll need to run this file first, using a MISSION START trigger + DO SCRIPT FILE action, if you want to use MIST scripts in your missions. Anyway, that's a pretty blunt way of implementing respawns. If you provide mission details, I can show you better ways of doing this. PS: Btw, MIST is meant for people who are already familiar with lua (and programming in general). If you're completely new to all this, MOOSE is much easier to learn. Edited June 10, 2019 by Hardcard [sIGPIC][/sIGPIC]
GrEaSeLiTeNiN Posted June 10, 2019 Posted June 10, 2019 @GrEaSeLiTeNiN Lua is case sensitive, you wrote that "If" with a capital "I", that's invalid syntax: [color=Blue]--This is incorrect:[/color] [color=Red][b]If[/b][/color] not Group.getByName('Su-33 1') then mist.respawnGroup('Su-33 1', true) end [color=Blue]--This is correct:[/color] [color=Green][b]if[/b][/color] not Group.getByName('Su-33 1') then mist.respawnGroup('Su-33 1', true) end Also, that's MIST code, which means that you need to run MIST first. Download mist_4_3_74.rar, then extract the file mist_4_3_74.lua from it. You'll need to run this file first, using a MISSION START trigger + DO SCRIPT FILE action, if you want to use MIST scripts in your missions. Anyway, that's a pretty blunt way of implementing respawns. If you provide mission details, I can show you better ways of doing this. Thanks, am totally new to MIST respawn script. Did some simple ME triggers in the past but not respawns. So I download the rar file but how do I run the lua file in ME? My mission design is quite simple actually. I have a pair (Group) of Su-33s take off from a carrier. In the event they are both shot down, damaged or crash, I simply want them both to respawn and take off from the carrier again in an endless cycle. It's a simple target practice mission (like a BMS dogfight match). Cheers AMD Ryzen 5 5600X | Gigabyte RTX 3070 Gaming OC 8GB | 64GB G.SKILL TRIDENT Z4 neo DDR4 3600Mhz | Asus B550 TUF Plus Gaming | 2TB Aorus Gen4 TM Warthog HOTAS | TrackIR 5 | Windows 10 Home x64 | My HOTAS Profiles
Hardcard Posted June 10, 2019 Posted June 10, 2019 (edited) @GrEaSeLiTeNiN If you don't know lua and are new to scripting, I don't think MIST is a suitable option for you. MIST requires advanced lua knowledge and the available documentation is rather limited. I recommend that you use MOOSE instead, since it's much easier to learn (it's pretty well documented, it has and it can be ). In order to use MOOSE, you'll need to download Moose.lua and include it at the start of any mission that uses MOOSE scripts. In order to run Moose.lua from ME, create a MISSION START trigger with DO SCRIPT FILE action (assign Moose.lua to the DO SCRIPT FILE action). As for your mission, here's a simple MOOSE script that will respawn any chosen late activated group after it has been destroyed (required fields in red): local Group_Spawn = SPAWN:New("[color="Red"]name of the late activated group in ME[/color]") Group_Spawn:InitLimit([color="red"]number of planes in the late activated group[/color], [color="red"]number of respawns allowed[/color]) Group_Spawn:SpawnScheduled(60,0) Edited June 10, 2019 by Hardcard [sIGPIC][/sIGPIC]
GrEaSeLiTeNiN Posted June 11, 2019 Posted June 11, 2019 @GrEaSeLiTeNiN If you don't know lua and are new to scripting, I don't think MIST is a suitable option for you. MIST requires advanced lua knowledge and the available documentation is rather limited. I recommend that you use MOOSE instead, since it's much easier to learn (it's pretty well documented, it has and it can be ). In order to use MOOSE, you'll need to download Moose.lua and include it at the start of any mission that uses MOOSE scripts. In order to run Moose.lua from ME, create a MISSION START trigger with DO SCRIPT FILE action (assign Moose.lua to the DO SCRIPT FILE action). As for your mission, here's a simple MOOSE script that will respawn any chosen late activated group after it has been destroyed (required fields in red): local Group_Spawn = SPAWN:New("[color=Red]name of the late activated group in ME[/color]") Group_Spawn:InitLimit([color=red]number of planes in the late activated group[/color], [color=red]number of respawns allowed[/color]) Group_Spawn:SpawnScheduled(60,0) Thanks very much. Got to do some reading up I guess. By the way, the MIST function worked to respawn the Su-33s each time. Thanks again! AMD Ryzen 5 5600X | Gigabyte RTX 3070 Gaming OC 8GB | 64GB G.SKILL TRIDENT Z4 neo DDR4 3600Mhz | Asus B550 TUF Plus Gaming | 2TB Aorus Gen4 TM Warthog HOTAS | TrackIR 5 | Windows 10 Home x64 | My HOTAS Profiles
Hardcard Posted June 11, 2019 Posted June 11, 2019 (edited) By the way, the MIST function worked to respawn the Su-33s each time Of course it did, MIST works. :thumbup: ...I'm just saying that it's harder to learn if you're a newbie, that's all ;) Edited June 11, 2019 by Hardcard [sIGPIC][/sIGPIC]
Recommended Posts