Kiptanoi Posted June 18, 2018 Share Posted June 18, 2018 Hello. I use this code mist.respawnGroup('MIG-21 #001', true) local con = Group.getByName('MIG-21 #001'):getController() con:setOption(AI.Option.Air.id.ROE, AI.Option.Air.RETURN_FIRE) But how do I set the skill on the MIG-21 #001 from script? Example, if I want to respawn the MIG-21 #001 with skill set to high? Link to comment Share on other sites More sharing options...
Kiptanoi Posted June 19, 2018 Author Share Posted June 19, 2018 Can it be done with moose? In that case, how? Link to comment Share on other sites More sharing options...
funkyfranky Posted June 19, 2018 Share Posted June 19, 2018 Can it be done with moose? In that case, how? Well, I never did this but with MOOSE you can try local migs=GROUP:FindByName("MIG-21 #001") local template=migs:GetTemplate() for _,unit in pairs(template.units) do unit.skill="High" end migs:Respawn(template) migs:OptionROEReturnFire() No guarantees though :) A warrior's mission is to foster the success of others. i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Link to comment Share on other sites More sharing options...
Kiptanoi Posted June 19, 2018 Author Share Posted June 19, 2018 (edited) Well, I never did this but with MOOSE you can try local migs=GROUP:FindByName("MIG-21 #001") local template=migs:GetTemplate() for _,unit in pairs(template.units) do unit.skill="High" end migs:ReSpawn(template) migs:OptionROEReturnFire() No guarantees though :) I am not sure if I understand you right now…. This code is spawning my plane, or does it Changes the settings on a allready spawned plane? Please do write all code I need to spawn that MIG-21 #001 and Changes it settings…. If I use this code with my editor settings on a Group named MIG-21 #001 local migs=GROUP:FindByName("MIG-21 #001") local template=migs:GetTemplate() for _,unit in pairs(template.units) do unit.skill="High" end migs:ReSpawn(template) migs:OptionROEReturnFire() Then nothing is spawned :/ If I use this code activeGroup = SPAWN:New( "MIG-21 #001" ) activeGroup:Spawn() local migs=GROUP:FindByName("MIG-21 #001") local template=migs:GetTemplate() for _,unit in pairs(template.units) do unit.skill="High" end migs:ReSpawn(template) migs:OptionROEReturnFire() I got i MIG-21 #001 spawned, but it is still on my editor settins on roe…. On what Skill, I can not check Edited June 19, 2018 by Kiptanoi Link to comment Share on other sites More sharing options...
Recommended Posts