Respawning ground units with MIST - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 04-05-2018, 02:40 PM   #1
PhoenixTunes
Junior Member
 
Join Date: Jan 2018
Location: Isle of Wight, Great Britain
Posts: 18
Question Respawning ground units with MIST

Hello everyone!
I'm trying to build a training range with a few tanks and unammned trucks, and i'm trying to create a script using MIST that will respawn them once they've all been destroyed.

I've used the "MISSION START" trigger to load MIST.

I've then created the following trigger that unfortunately doesn't seem to work

CONTINUOUS ACTION > GROUP DEAD ("TANKS") > DO SCRIPT: if not Group.getByName('Tanks') then

mist.respawnGroup('Tanks', true)


end

Any help is greatly appreciated
PhoenixTunes is offline   Reply With Quote
Old 04-06-2018, 12:29 AM   #2
Grimes
Beta Tester
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 8,274
Default

Group.getByName() returns the object even if it is dead. So you can check how many units are alive. if Group.getByName('Tanks') and #Group.getByName('Tanks'):getUnits() < 1 then
respawn group

Also the group dead condition might also need to be changed to a lua predicate. It used to work how you have it, but unfortunately I believe it only works the first time.

lua predicate: if Group.getByName('Tanks') and #Group.getByName('Tanks'):getUnits() < 1 then return true end
__________________
The right man in the wrong place makes all the difference in the world.
Current Projects: Scripting Wiki, Something...
Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD for DCS 1.5/2.0, IADScript, Mission Editing Wiki!, Mission Building Forum
Grimes is offline   Reply With Quote
Old 04-07-2018, 10:18 AM   #3
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,372
Default

when i used to use MIST and respawn stuff I would use

switched condition trigger group (EASY#001) group dead
then for action
mist.respawnInZone('EASY#001', 'spawn_zone1', True, 700)
__________________
METAR weather for DCS World missions

Guide to help out new DCS MOOSE Users -> HERE
Havoc Company Dedicated server info Connect IP: 94.23.215.203
SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245
Please contact me HERE if you have any server feedback or METAR issues/requests
Johnny_Rico is offline   Reply With Quote
Reply

Tags
editor, mist, respawn, tanks, training

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:29 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.