Kiptanoi Posted June 18, 2018 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?
Kiptanoi Posted June 19, 2018 Author Posted June 19, 2018 Can it be done with moose? In that case, how?
funkyfranky Posted June 19, 2018 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 | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
Kiptanoi Posted June 19, 2018 Author 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
Recommended Posts