Jump to content

Respawning units with invisible state


Xander_

Recommended Posts

Hey, so I have added a respawn script to my mission and made it respawn the JTAC Reaper drones, AWACS, and Tankers. This works fine. My issue is I have them all set to invisible and after they respawn they seem to lose the invisible command and then get shot down immediately. Does anyone know how I can fix this so I can have my mission running on my server 24/7 and not have everything shot down by the red AI after it respawns when its set to invisible?

Link to comment
Share on other sites

I use this in one of my missions:

 

local function S_Invis_1()

if Group.getByName('I-SUB #001') ~= nil then
	local sub1 = Group.getByName("I-SUB #001")
	local SetInvisible = {
		id = 'SetInvisible',
		params = {
		value = true
		}}
		
		sub1:getController():setCommand(SetInvisible)
end
end
S_Invis_1()

Link to comment
Share on other sites

I use this in one of my missions:

 

local function S_Invis_1()

if Group.getByName('I-SUB #001') ~= nil then
	local sub1 = Group.getByName("I-SUB #001")
	local SetInvisible = {
		id = 'SetInvisible',
		params = {
		value = true
		}}
		
		sub1:getController():setCommand(SetInvisible)
end
end
S_Invis_1()

 

So I just add this as a do script or do I add this onto my respawn script then change the "I-SUB #001" for my unit name?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...