MIssion Scripting Tools (Mist)- enhancing mission scripting Lua - Page 127 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 04-17-2017, 10:28 PM   #1261
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 3,168
Default

that worked. will look into juggling start times more
__________________
“Six better fuses and we would have lost.”
Pikey is offline   Reply With Quote
Old 05-19-2017, 02:14 PM   #1262
Veteran66
Member
 
Join Date: Mar 2016
Location: Germany
Posts: 135
Default

Hi all
I look for a script

plane group fires = Flag1 on

The Plane Group is Bf-109K-4




i try this, but it will not work:

local Plane = UNIT:FindByName( "Plane" )

Plane:HandleEvent( EVENTS.Shot )

---
-- @param Wrapper.Unit#UNIT self
-- @param Core.Event#EVENTDATA EventData
function Plane:OnEventShot(EventData)

if EventData.WeaponName == "weapons.MG_131" then
MESSAGE:New("Plane shot Gun",15,"Alert!"):ToAll()
local Task = EventData.IniGroup:TaskOrbitCircle( 5000, 450 )
EventData.IniGroup:pushTask( Task, 30 )
end

end
__________________
German WW2 Radio calls Mod:
https://www.digitalcombatsimulator.c...files/2161798/
Veteran66 is offline   Reply With Quote
Old 05-19-2017, 11:18 PM   #1263
Grimes
ED Testers Team
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 7,633
Default

The shot event is for all non rapid fire shell based weapons. You need to use the event shooting start. This event does not return any weapon data, only the initiator, but it will occur anytime a rapid fire gun is fired. You would need to either know the aircraft type and its associated MG ammo type or use world.searchObjects in the immediate area around the initiator aircraft to find the shell and get the name type.

So take an M1 Abrams for example. The main cannon would produce a "SHOT" event with HE and AP shells. The coaxial and commander turret will create "SHOOTING START" and "SHOOTING STOP" events. In the case of aircraft that have more than one gun that can fire at a time, each one will create a shooting start/stop events.

By the way it is not ideal to post questions related to a specific scripting library in a different scripting thread. In this case posting moose code in the mist thread. So while I will answer questions specifically related to the scripting engine in general here, I can't really help you with the moose side of things.
__________________
You can only tie the world record for lowest flight.
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 05-20-2017, 08:39 AM   #1264
Veteran66
Member
 
Join Date: Mar 2016
Location: Germany
Posts: 135
Default

Thx for your help
__________________
German WW2 Radio calls Mod:
https://www.digitalcombatsimulator.c...files/2161798/
Veteran66 is offline   Reply With Quote
Old 05-22-2017, 02:05 PM   #1265
ward8124
Member
 
Join Date: Oct 2012
Location: East Anglia - UK
Posts: 158
Default

To save me from reading through 127 pages and is a daft question but does MIST need to be installed on the server or can I just install it to my local laptop create the mission and then export to a dedicated server? Apologies for my noobishness.
__________________
EVGA GTX1080TISC2 Black Hybrid Cooler, Asus Strix X399, Water cooled ThreadRipper 1920X, Dominator 32GB 3200Mhz,NVME Samsung 250/500GB SSDs, Corsair Air 740 case, Acer Predator 34' Gsync curved display + 3x Alienware 23inch 120hz monitors. TM HOTAS, RAZER - Tiamat,Blackwidow, Mamba, Tartarus and Oculus Rift CV1/DK2 + TrackIR5, MFG crosswinds

Oh and a very understanding wife.
ward8124 is offline   Reply With Quote
Old 05-22-2017, 11:50 PM   #1266
Grimes
ED Testers Team
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 7,633
Default

It is a mission script. You add it as part of a trigger, usually Once> Time Less than 10> Do Script File(mist.lua) works quite well. So by adding to execute as part of a trigger it will automatically embed the mist file into the mission file. Once the trigger runs in the mission all of the mist functions and tables are globally accessible. Its up to you to make a script that uses it.
__________________
You can only tie the world record for lowest flight.
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 05-23-2017, 08:39 PM   #1267
Subferro
Junior Member
 
Join Date: Jan 2006
Posts: 63
Default

At one point it looks like mist.respawnGroup() and related functions would return the new group name as a string, now it seems to return the group table. How can I get the new group name from this table?
Subferro is offline   Reply With Quote
Old 05-23-2017, 11:15 PM   #1268
Chump
Member
 
Chump's Avatar
 
Join Date: Oct 2010
Location: Spring Hill, KS
Posts: 185
Default

It should be as simple as:

Code:
local newGroup = mist.respawnGroup(params)
local newGroupName = newGroup.name
or
Code:
local newGroupName = mist.respawnGroup(params).name
Chump is offline   Reply With Quote
Old 05-29-2017, 08:56 AM   #1269
Yappo
Senior Member
 
Yappo's Avatar
 
Join Date: Jun 2014
Posts: 1,054
Default

http://wiki.hoggit.us/view/RespawnGroup
mist.respawnGroup('groupName', 120)

Why does my group reborn at once?
__________________

Yappo is online now   Reply With Quote
Old 05-29-2017, 10:44 AM   #1270
Grimes
ED Testers Team
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 7,633
Default

You are going to have to be more descriptive with your question. I don't understand what exactly you are asking.
__________________
You can only tie the world record for lowest flight.
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
Reply

Tags
mist

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:55 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.