Jump to content

Recommended Posts

Posted

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?

2.thumb.jpg.02154eeddcc70a022669a741534e4a5e.jpg

3.thumb.jpg.399485096a779746a68852e0666c26ce.jpg

4.thumb.jpg.c2a63f659995c2871299e1f767efe71e.jpg

5.thumb.jpg.1d6ab562b938e50ea5815767463edb95.jpg

6.thumb.jpg.16054d4b5da131511e88bcf907f50e02.jpg

Mi8 pilot of [VODKA] squadron

Posted

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.

Posted

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

Posted
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

Posted (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 by predattak
  • 2 years later...
Posted
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

  • 3 months later...
Posted
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...

1teMe5m.jpg

 

1SYEd7h.jpg

 

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

Posted (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 by Hardcard
Posted
@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

Posted (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 by Hardcard
Posted
@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

Posted (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 by Hardcard
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...