mist.respawnGroup set skill? - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 06-18-2018, 09:12 PM   #1
Kiptanoi
Junior Member
 
Join Date: Dec 2017
Posts: 23
Default mist.respawnGroup set skill?

Hello.

I use this code
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 is offline   Reply With Quote
Old 06-19-2018, 07:53 AM   #2
Kiptanoi
Junior Member
 
Join Date: Dec 2017
Posts: 23
Default

Can it be done with moose?
In that case, how?
Kiptanoi is offline   Reply With Quote
Old 06-19-2018, 11:36 AM   #3
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 1,740
Default

Quote:
Originally Posted by Kiptanoi View Post
Can it be done with moose?
In that case, how?
Well, I never did this but with MOOSE you can try
Code:
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
__________________
Of all the things I've lost, I miss my mind the most. --- Mark Twain
i7-8700K | Asus GTX 1080 Ti Strix OC| 32 GB Ram 3200 MHz DDR-4| Win 10 64-bit | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | CV1
funkyfranky is offline   Reply With Quote
Old 06-19-2018, 09:32 PM   #4
Kiptanoi
Junior Member
 
Join Date: Dec 2017
Posts: 23
Default

Quote:
Originally Posted by funkyfranky View Post
Well, I never did this but with MOOSE you can try
Code:
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
Code:
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

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

Last edited by Kiptanoi; 06-19-2018 at 10:13 PM.
Kiptanoi is offline   Reply With Quote
Reply

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