Johnny_Rico Posted August 23, 2017 Share Posted August 23, 2017 (edited) Thank you, I started with a fresh mission and have this generally working. When I enter a trigger zone, a flag gets set, and the units start spawning. I need to figure out how to get them to stop spawning though. Once that code gets switched on, it keeps running. Resetting the flag with a different trigger doesn't stop it. the 4 means have 4 active at once , 20 is how many i can have in total (once 20 destroyed no more will spawn) InitLimit( 4, 20 ) to InitLimit( 4, 4 ) that will give you 4 aircraft only Edited August 23, 2017 by Johnny_Rico 1 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 Link to comment Share on other sites More sharing options...
fargo007 Posted August 24, 2017 Share Posted August 24, 2017 What does it mean when I try to load the Moose.lua from the Mission Setup directory and it errors out when the mission starts with: 11: can't open 'Scripts/Moose/Utilities/Routines.lua' Something's definitely not right. When I load a sample *.miz mission, they all work perfectly but every time I start with my own, follow the instructions with a mission start trigger, no condition, and load this file, it explodes. I really like the Moose framework and would love to get this resolved. Any help appreciated. Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
Johnny_Rico Posted August 24, 2017 Share Posted August 24, 2017 attach your mission file , I will try to help you 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 Link to comment Share on other sites More sharing options...
fargo007 Posted August 24, 2017 Share Posted August 24, 2017 Thank you very much! This mission is in debug mode so it won't make much sense. I downloaded another copy of Moose.lua and am not getting that error anymore. The behavior I am getting now, is that the moose portion executes randomly/unreliably. One time it will work, then if I quit and run it again, it doesn't reach the if condition and that code block does not execute. I want to put together a series of embassy missions like this.thats_suicide_man.with.moose.mizthats-suicide-moose-script.lua Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
FlightControl Posted August 24, 2017 Author Share Posted August 24, 2017 Thank you very much! This mission is in debug mode so it won't make much sense. I downloaded another copy of Moose.lua and am not getting that error anymore. The behavior I am getting now, is that the moose portion executes randomly/unreliably. One time it will work, then if I quit and run it again, it doesn't reach the if condition and that code block does not execute. I want to put together a series of embassy missions like this. What you mean with... Randomly / Unreliably? You mean: Moose does not work as expected, ir your script works as expected? [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] Link to comment Share on other sites More sharing options...
FlightControl Posted August 24, 2017 Author Share Posted August 24, 2017 (edited) I have been playing with the following, just to create some ai flights to test my air defenses:- BlueSpawn1 = SPAWN :New( "RT NATO 1" ) :InitLimit( 2, 10 ) :InitRandomizeTemplate( { "SQ NATO F-15C", "SQ NATO F/A-18", "SQ NATO F-16C" } ) :InitRandomizeRoute( 0, 0, 30000 ) --:InitDelayOn() :SpawnScheduled( Frequency, 0.4 )I have been running this just on a Do Script trigger. Is there something within MOOSE that i can insert into that script call, to allow me to randomise the number of flight members. I currently have the aircraft templates set with just one aircraft, but ideally would like to be able to place just the one template aircraft in the editor, then let the script define how many are spawned in a flight, from a single ship up to a four ship. I am looking through the documentation to sort this out, but figured i would post here incase it was something quick. Thanks in advance for any help. http://flightcontrol-master.github.io/MOOSE/Documentation/Spawn.html##(SPAWN).InitGrouping Put a template of one plane. Use InitGrouping( 2 ) and I believe it should spawn 2 planes. Put a template of 4 planes. Use InitGrouping( 3 ) and it should spawn 3 planes. But take care, I don't think you can use InitLimit (yet) with InitGrouping. Edited August 24, 2017 by FlightControl [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] Link to comment Share on other sites More sharing options...
fargo007 Posted August 24, 2017 Share Posted August 24, 2017 (edited) What you mean with... Randomly / Unreliably? You mean: Moose does not work as expected, ir your script works as expected? Thanks for jumping in FC. The second trigger that loads the script, I had it named with a long name with underscores. With a name like that, it would execute my script "sometimes." Changing that to simply "Mission load" it is now executing every time. ETA - I am really starting to have fun with moose. Doing some really cool stuff even though it's pretty knoob. e.g. I have a helo mission in the dark where you have to locate and interdict a certain vehicle. When you are over the correct one, you get a message indicating so. Next steps: Direct a ground unit to them to engage. Looks like a number of different ways to skin that cat. Edited August 24, 2017 by fargo007 Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
fargo007 Posted August 25, 2017 Share Posted August 25, 2017 Duh. Just found the escort class and realized I was reinventing the wheel. Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
FlightControl Posted August 25, 2017 Author Share Posted August 25, 2017 I hope the wheel is round enough for you, hehe. The waypoint stuff in escort needs to be fixed, though. Also suggest to many to explore first what is in the box :-) [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] Link to comment Share on other sites More sharing options...
fargo007 Posted August 25, 2017 Share Posted August 25, 2017 (edited) nvm, figured it out. Edited August 26, 2017 by fargo007 Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
L39Tom Posted August 26, 2017 Share Posted August 26, 2017 Is it possible to mix up lua-script and Mission-Editor-syntax? I made a polygone-zone within moose an wants to make a flag (e.g. flag 99) of the MissionEditor to get true whenever a unit enters the zone. Or may I create a polygone-zone, give it a name and work with that in the mission editor? Sorry, Moose for Dummies Tom Link to comment Share on other sites More sharing options...
Rivvern Posted August 26, 2017 Share Posted August 26, 2017 Started working on my mission template again. Was flying a session where i attacked an enemy CAP. They did nothing to defend themself. A bit boring. Havent done any more testing about that issue. But i was looking into the dcs.log and i see this. Does this look ok to you? 40917.812 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01466.function(Group red 426th cap#001 ... RTB! ( Fuel )) 40917.812 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01466.function(RTB and near the airbase!) 40917.812 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01466.function(Group red 426th cap#001 ... Home! ( Home )) 40917.812 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01480.function(Group red 689th cap#001 ... RTB! ( Fuel )) 40917.812 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01480.function(RTB and near the airbase!) 40917.812 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01480.function(Group red 689th cap#001 ... Home! ( Home )) 40918.085 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP67296.function(red 689th cap#003 is out of fuel: 0 ... RTB!) 40918.085 INFO SCRIPTING: 22309( 36807)/E: GROUP67286.GetTemplate(red 689th cap#003) 40918.683 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP67296.function(Group red 689th cap#003 ... RTB! ( Fuel )) 40919.116 INFO SCRIPTING: 32631( -1)/E: DETECTION_AREAS01156.function({[1]="Detecting",[2]="Detect",[3]="Detecting",}) 40919.116 INFO SCRIPTING: 32631( -1)/E: DETECTION_AREAS01184.function({[1]="Detecting",[2]="Detect",[3]="Detecting",}) 40919.311 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01156.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40919.311 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01184.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40920.185 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP88652.function(blue 35th cap#004 is out of fuel: 0 ... RTB!) 40920.185 INFO SCRIPTING: 22309( 36807)/E: GROUP88642.GetTemplate(blue 35th cap#004) 40920.314 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01156.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40920.314 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01184.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40920.783 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP88652.function(Group blue 35th cap#004 ... RTB! ( Fuel )) 40920.783 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP88652.function(RTB and near the airbase!) 40920.784 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP88652.function(Group blue 35th cap#004 ... Home! ( Home )) 40921.313 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01156.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40921.314 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01184.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40922.312 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01156.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40922.312 INFO SCRIPTING: 32654( -1)/E: DETECTION_AREAS01184.function({[1]="Detecting",[2]="DetectionGroup",[3]="Detecting",}) 40924.532 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP137512.function(red 689th cap#004 is out of fuel: 0.13755695521832 ... RTB!) 40924.532 INFO SCRIPTING: 22309( 36807)/E: GROUP137502.GetTemplate(red 689th cap#004) 40924.556 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP119227.function(blue 390th cap#002 is out of fuel: 0 ... RTB!) 40924.556 INFO SCRIPTING: 22309( 36807)/E: GROUP119217.GetTemplate(blue 390th cap#002) 40925.126 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP137512.function(Group red 689th cap#004 ... RTB! ( Fuel )) 40925.151 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP119227.function(Group blue 390th cap#002 ... RTB! ( Fuel )) 40925.151 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP119227.function(RTB and near the airbase!) 40925.151 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP119227.function(Group blue 390th cap#002 ... Home! ( Home )) 40925.383 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP104742.function(red 426th cap#002 is out of fuel: 0 ... RTB!) 40925.383 INFO SCRIPTING: 22309( 36807)/E: GROUP104732.GetTemplate(red 426th cap#002) 40925.980 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP104742.function(Group red 426th cap#002 ... RTB! ( Fuel )) 40925.980 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP104742.function(RTB and near the airbase!) 40925.980 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP104742.function(Group red 426th cap#002 ... Home! ( Home )) 40927.315 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP01416.function(blue 35th cap#001 is out of fuel: 0 ... RTB!) 40927.315 INFO SCRIPTING: 22309( 36807)/E: GROUP01406.GetTemplate(blue 35th cap#001) 40927.315 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP01430.function(blue 147th cap#001 is out of fuel: 0 ... RTB!) 40927.315 INFO SCRIPTING: 22309( 36807)/E: GROUP01420.GetTemplate(blue 147th cap#001) 40927.315 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP01452.function(blue vf-84 cap#001 is out of fuel: 0 ... RTB!) 40927.315 INFO SCRIPTING: 22309( 36807)/E: GROUP01434.GetTemplate(blue vf-84 cap#001) 40927.316 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP01466.function(red 426th cap#001 is out of fuel: 0 ... RTB!) 40927.316 INFO SCRIPTING: 22309( 36807)/E: GROUP01456.GetTemplate(red 426th cap#001) 40927.317 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP01480.function(red 689th cap#001 is out of fuel: 0 ... RTB!) 40927.317 INFO SCRIPTING: 22309( 36807)/E: GROUP01470.GetTemplate(red 689th cap#001) 40927.913 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01416.function(Group blue 35th cap#001 ... RTB! ( Fuel )) 40927.913 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01416.function(RTB and near the airbase!) 40927.913 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01416.function(Group blue 35th cap#001 ... Home! ( Home )) 40927.913 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01430.function(Group blue 147th cap#001 ... RTB! ( Fuel )) 40927.913 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01430.function(RTB and near the airbase!) 40927.913 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01430.function(Group blue 147th cap#001 ... Home! ( Home )) 40927.913 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01452.function(Group blue vf-84 cap#001 ... RTB! ( Fuel )) 40927.913 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01452.function(RTB and near the airbase!) 40927.913 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01452.function(Group blue vf-84 cap#001 ... Home! ( Home )) 40927.913 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01466.function(Group red 426th cap#001 ... RTB! ( Fuel )) 40927.913 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01466.function(RTB and near the airbase!) 40927.913 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01466.function(Group red 426th cap#001 ... Home! ( Home )) 40927.914 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP01480.function(Group red 689th cap#001 ... RTB! ( Fuel )) 40927.914 INFO SCRIPTING: 36909( -1)/E: AI_A2A_CAP01480.function(RTB and near the airbase!) 40927.914 INFO SCRIPTING: 36950( -1)/E: AI_A2A_CAP01480.function(Group red 689th cap#001 ... Home! ( Home )) 40928.183 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP67296.function(red 689th cap#003 is out of fuel: 0 ... RTB!) 40928.183 INFO SCRIPTING: 22309( 36807)/E: GROUP67286.GetTemplate(red 689th cap#003) 40928.785 INFO SCRIPTING: 36891( -1)/E: AI_A2A_CAP67296.function(Group red 689th cap#003 ... RTB! ( Fuel )) 40930.281 INFO SCRIPTING: 36805( -1)/E: AI_A2A_CAP88652.function(blue 35th cap#004 is out of fuel: 0 ... RTB!) [sIGPIC][/sIGPIC] We are looking for Swedish members! http://www.masterarms.se Link to comment Share on other sites More sharing options...
FlightControl Posted August 27, 2017 Author Share Posted August 27, 2017 Some more fixes, ensure you have the latest version. This one upon request for issue resolvement for Ramsay and Thepikester. The coordinate management menus have improved. Settings management now has modified Lattitude Longitude coordinate representation options, that are federated and formatting any coordinate information messaged using the moose framework. Now the LL menu is replaced by 2 menus, Lon/Lat Degree Min Sec (LL DMS) Lon/Lat Degree Dec Min (LL DDM) [*] LL Accuracy menu options are only available when LL DDM. As agreed, for LL DMS there won't be any accuracy. Optimized the menu settings logic. Default menu setting is BR for A2G and BRAA for A2A. You can download the latest release from: https://github.com/FlightControl-Master/MOOSE/releases FC [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] Link to comment Share on other sites More sharing options...
EntropySG Posted August 27, 2017 Share Posted August 27, 2017 thanks! [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Johnny_Rico Posted August 27, 2017 Share Posted August 27, 2017 Thanks Sven, I will update my mission and report back 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 Link to comment Share on other sites More sharing options...
Subferro Posted August 28, 2017 Share Posted August 28, 2017 Maybe the wrong thread as this could not be a Moose issue but... I'm trying to use scripts to make a group behave as a JTAC. It needs to be done via script because I want to be able to spawn units that then take on a FAC role. I've seen the scripted JTAC tasks, but want the unit to use the JTAC radio menu already in the game. It seems like this should be possible with the 'FAC_AttackGroup' action but I'm having no luck and getting no log errors to help find the problem. Here's a basic script I'm trying. Most of it works because I can see the unit activate EPLRS and show up on my TAD, but for some reason the FAC task won't activate (or if it does the radio option never shows up): Spawn_Target = SPAWN:New( "Spawn Target" ) SpawnTargetGroup = Spawn_Target:Spawn() Spawn_JTAC = SPAWN:New( "Spawn JTAC" ) SpawnJTACGroup = Spawn_JTAC:Spawn() function StartJTAC() local TargetGroupName = SpawnTargetGroup:GetName() local JTACGroupName = SpawnJTACGroup:GetName() local TargetGroup = Group.getByName(TargetGroupName) local JTACFACAction = { id= 'FAC_AttackGroup', params = { groupID = TargetGroup.ID, datalink = true, frequency = 45, modulation = 1, callname = 2, number = 4 } } Group.getByName(JTACGroupName):getController():setCommand({id = 'EPLRS',params = {value = true, groupId = 9,}}) Group.getByName(JTACGroupName):getController():setCommand({id = 'SetInvisible',params = {value = true}}) Group.getByName(JTACGroupName):getController():setTask(JTACFACAction) end StartJTAC() Link to comment Share on other sites More sharing options...
FlightControl Posted August 29, 2017 Author Share Posted August 29, 2017 (edited) Maybe the wrong thread as this could not be a Moose issue but... I'm trying to use scripts to make a group behave as a JTAC. It needs to be done via script because I want to be able to spawn units that then take on a FAC role. I've seen the scripted JTAC tasks, but want the unit to use the JTAC radio menu already in the game. It seems like this should be possible with the 'FAC_AttackGroup' action but I'm having no luck and getting no log errors to help find the problem. Here's a basic script I'm trying. Most of it works because I can see the unit activate EPLRS and show up on my TAD, but for some reason the FAC task won't activate (or if it does the radio option never shows up): You need to look into the DESIGNATE functionality of the moose framework. DESIGNATE performs a JTAC functionality, but does it in a proprietary system. I will however add later proper JTAC radio commands in the system, so that capable planes can use the radio menu to communicate with the JTAC over the radio, but for now it just works with a proprietary logic using self created radio menus, which also allow russian era planes to use a JTAC function. It also allows to lase, smoke and illuminate targets. These targets may be dynamically spawned. gGX7GcCBq_E Edited August 29, 2017 by FlightControl [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] Link to comment Share on other sites More sharing options...
FlightControl Posted August 29, 2017 Author Share Posted August 29, 2017 (edited) Started working on my mission template again. Was flying a session where i attacked an enemy CAP. They did nothing to defend themself. A bit boring. Havent done any more testing about that issue. Hi Rivvern, I am working on a pile of fixes in one github branch. There is also a new issue raised regarding this. It seems that when the EWR does not detect the intruder (you), the CAP won't do anything. Can you check if you were in EWR range when you had this issue? I am thinking on a solution for this problem. See here: https://github.com/FlightControl-Master/MOOSE/issues/670 Edited August 29, 2017 by FlightControl [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] Link to comment Share on other sites More sharing options...
wopski Posted August 29, 2017 Share Posted August 29, 2017 Hi FlightControl and thanks for all your hard work! I have a quick question for you if I may? Is it possible to spawn static objects in random locations using Moose? If so can you point me in the right direction on how to do this? Many thanks! Link to comment Share on other sites More sharing options...
FlightControl Posted August 29, 2017 Author Share Posted August 29, 2017 (edited) Hi FlightControl and thanks for all your hard work! I have a quick question for you if I may? Is it possible to spawn static objects in random locations using Moose? If so can you point me in the right direction on how to do this? Many thanks! Sure! Check the SPAWNSTATIC class! It allows to "spawn" dynamically new static objects into your running mission. You need to "import" first all the static objects you wanna spawn into your mission as a "template". Just place them at a random location and give it a name. Then you can use the SPAWNSTATIC class to spawn new statics from the template. The reason why I opted for this method is that is avoid having to type complicated type names of static objects... Now you just use the name of the static you have given. For now, you can spawn STATICs in ZONEs (at random locations) and at specific COORDINATE locations. Note that ZONEs can be instances of: ZONE_POLYGON ZONE ZONE_RADIUS ZONE_GROUP ZONE_UNIT In other words, the sky is the limit! This is the documentation page of SPAWNSTATIC. Select the demo mission link for a demonstration mission. --- Name: SPS-100 - Simple Spawning -- Author: FlightControl -- Date Created: 09 Apr 2017 -- -- # Situation: -- -- At Gudauta spawn a static. -- -- # Test cases: -- -- 1. Observe that the static is spawned. local ZonePosition = ZONE:New( "Position" ) local SpawnBuilding = SPAWNSTATIC:NewFromStatic( "Building", country.id.GERMANY ) local SpawnBarrack = SPAWNSTATIC:NewFromStatic( "Barrack", country.id.GERMANY ) local ZonePointVec2 = ZonePosition:GetPointVec2() local Building = SpawnBuilding:SpawnFromZone( ZonePosition, 0 ) for Heading = 0, 360,60 do local Radial = Heading * ( math.pi*2 ) / 360 local x = ZonePointVec2:GetLat() + math.cos( Radial ) * 150 local y = ZonePointVec2:GetLon() + math.sin( Radial ) * 150 SpawnBarrack:SpawnFromPointVec2( POINT_VEC2:New( x, y ), Heading + 90 ) end Hope it helps. FC Edited August 29, 2017 by FlightControl [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] Link to comment Share on other sites More sharing options...
wopski Posted August 29, 2017 Share Posted August 29, 2017 Doh! Sorry didn't see the forest for all the trees! Many thanks! Link to comment Share on other sites More sharing options...
FlightControl Posted August 29, 2017 Author Share Posted August 29, 2017 Doh! Sorry didn't see the forest for all the trees! Many thanks! My pleasure, these kind of questions let me know that there are people using some stuff of the framework. So something must be right about it :) What stuff are U using of it? Any other questions? [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] Link to comment Share on other sites More sharing options...
wopski Posted August 29, 2017 Share Posted August 29, 2017 Atm I'm using Unit Array's for a dynamic ground war MP mission environment so far and it works really well I must say! The only question I have is for some reason US Arty M109 and MLRS won't move when used in an array. They did at first but I'm not sure if it's the last patch that the issue started or when I added CTLD to my mission? (both happened on the same day) will check further! It's the closest thing we have to a dynamic campaign so many thanks for that! Got to love random shizzle ;) Will check back if I have any issues with the statics. Regards, Link to comment Share on other sites More sharing options...
FlightControl Posted August 29, 2017 Author Share Posted August 29, 2017 Implemented a bunch of new fixes. Some are important changes. The most important are improvement for the AI_A2A_DISPATCHER or the AI_A2A_GCICAP module. Fixed CAP and GCI issues. DETECTION now has a "cache" that keeps the last coordinates after a detection. TASKING and DISPATCHER now use the coordinate cache instead of the real coordinates. Bottom line, you'll notice that the coordinates of detected targets are only updated if a detection run happens. That means that when you arrive at the target vicinity, you will still need to "search" for the exact targets, as they may have moved since the last detection :-) Updated TASK_A2G_DISPATCHER, in terms of assigned task updating and planned task updating... Fixed DETECTION reports, and COORDINATE reports. When a source controllable is not given and the requested format is BR or BRAA, the COORDINATE is formatted as MGRS. See details here: DETECTION has now a detection "cache" that contains the last detected targets and coordinates. AI_A2A_DISPATCHER now uses the DETECTION cache. So until a new DETECTION is done, the coordinates aren't updated! TASK_A2G_DISPATCHER now uses the DETECTION cache. So until a new DETECTION is done, the coordinates aren't updated! AI_A2A_DISPATCHER: CAP now counts correctly per squadron. The specified amount of CAP will work now. AI_A2A_DISPATCHER: CAP now schedules at different start times, and have different repeat times. More random. AI_A2A_DISPATCHER: GCI is now correctly spawning. AI_A2A_DISPATCHER: Fixed issue with waypoints working differently in 2.1.1 as in 1.5.7!!! It cause big issues. AI_A2A_DISPATCHER: Solved issue with CAP not engaging target. DETECTION problem with ESCORT fixed! DESIGNATE can now lase targets with specific laser codes upon request by players. Methods :AddMenuLaserCode() and :RemoveMenuLaserCode() added, which allow to set or delete specific additional menu options in the lase menu for players to lase with specific codes. This comes in handy for the SU-25T and the A-10A and other planes. Detection reports of DETECTION classes now are returned as a REPORT object. So they can be streamed with various delimiters \n or , or other... If a coordinate needs to be represented by BR or BRAA, then a "source" controllable is required, which is usually the player aircraft. If not given, the coordinate will be returned in MGRS format !!! TASK_A2G_DISPATCHER task updating is now improved. New tasks when defined for the first time aren't dissapearing from the menu and appearing again. They are consistent. The whole task dispatching has been reworked and is now much more consistent. The conversion of assigned tasks are now improved. The conversion of planned tasks are also improved. TASK_A2A_DISPATCHER: Need to do the same as above. You can download the latest release from: https://github.com/FlightControl-Master/MOOSE/releases FC [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] Link to comment Share on other sites More sharing options...
fargo007 Posted August 29, 2017 Share Posted August 29, 2017 Hey FC, I have a question regarding the GROUP class as used on Moose-spawned groups. What am I doing wrong here? I only get an object when I reference the group by the template name (target1) ONLY. I can look on the map and see that the groups are in fact created as the docs indicate as GroupName#001, GroupName#002, etc, but referencing them isn't returning the group. Spawn_Vehicle_1 = SPAWN:New( "target1" ) :InitLimit( 3, 3 ) :InitRandomizeRoute( 1, 4, 5000 ) :SpawnScheduled( 3, .5 ) -- The 3 vehicle groups spawn successfully and begin their randomized route -- They are named according to the map as target1#001-#003 MESSAGE:New("DEBUG: MOOSE LOADED",10,"MOOSE Event"):ToAll() local HeliGroup = GROUP:FindByName( "FAC01") local GroupInside = GROUP:FindByName( "helo1") [b]local target1 = GROUP:FindByName("target1#001")[/b] --this doesn't work, but if I used GROUP:FindByName("target1") it does. if (target1) then MESSAGE:New("DEBUG: TARGET1 initialized",10,"MOOSE Event"):ToAll() end So basically I want to get at my spawned groups by the correct name. Thanks, /Fargo007 Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now