Jump to content

Recommended Posts

Posted

Just getting into the editor a little here, taken my first step with MIST and managed to get the CAP script working, and adjusted in my training mission, very happy to have got this far.

 

I am adding 6 static objects (enemy vehicles) all with a unique name, a flight will follow waypoints to the training area, destroy the targets with CBU, then back to base, re-arm, take off and do the route again, near the targets on one of those waypoints I am trying to create a trigger to respawn those units again if they are all dead.

 

So far I setup a continuous trigger, part of group in trigger area, if X,y,z unit is dead, then that fires a message saying re-spawning units, that is as far as I got, so guessing I need to add some LUA or script or whatever.

 

Completely over my head all the scripting and lua stuff, and only got this far because of the well written header in the CAP script, and some basic understanding of other types of script editing..

 

So had a quick look in the MIST readme, and found some reference to re-spawning, and specifically mentioned the kind of thing I might like to do, but not actually sure how to implement that code, or indeed the exact syntax, or where to even enter that syntax ?

 

My units are called CBUtraining1 , CBUtraining2 , through to six etc, for reference.

 

So once again, just to summarise, once those units are dead, I want them to respawn when part of the attack group go through a trigger, basically a never ending loop of that state, so you can play the loop as many times as you like.

 

Spent some time searching and reading and no closer, tried the set flag command and various other things suggested to no avail so far.

 

Two differences I see between my question and commonly asked questions, firstly I want to respawn when in a trigger zone, rather than just based on time after death, and secondly my "group" is a static group not a "Unit" so to speak, not sure if that makes a difference in the options I am using, but I tried as many variations on the answers people have posted in similar questions elsewhere.

 

If someone can give me a leg up here and set me on the right course it would be much appreciated please ?

Posted

Trigger Area = "Respawn" in my waypoint 5 area

 

=====

 

Switched Condition, Group Dead (CBUtest6), Flag On (1000)

 

=====

 

Switched Condition, Part of Group (Hawg or Dodge) in Zone (Respawn), DO Script: Then in the text box, mist.respawnGroup('CBUtest6', true) , Flag Off (1000), Message To Coalition: Group Respawned.

 

==========

With the following the message appears "Group Respawned" if the static object CBUtest6 is destroyed and I fly into the trigger area......this shows me all my conditions above are being met, the only thing which doesn't happen is that the group is not "Respawned" ?

 

Mist is loaded as the first script in the mission, along with the CAP script, both of which function perfectly.

Posted

I tried changing the object from a static object to a proper "group" and the 1 vehicle test group re-spawns correctly every time........so the question remains how to achieve this with a static object please ?

Posted
I tried changing the object from a static object to a proper "group" and the 1 vehicle test group re-spawns correctly every time........so the question remains how to achieve this with a static object please ?

 

I don't think that it's possible to do this with static objects. But I'm just a noob in DCS scripting compared to many of the other scriptophiles on this forum. Better leave a definitive answer up to them.

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Posted

It is starting to look that way yes, I am making do with std objects for now, now replaced all the original static objects with a proper group and it respawns just fine every time, just set weapons hold to make them harmless.

Posted

Ok thanks, will be useful to know for other things no doubt, for the moment making do with regular units with weapons set to hold fire.....does the job at least, and those respawning just fine atm thanks. :thumbup:

  • Recently Browsing   0 members

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