$IFF Name: IFF_1
$Color: ( 255, 0, 255 )
$Attacks: ( "Hostile" "Neutral" "Traitor" )
+Sees Friendly As: ( 0, 0, 255 )
+Sees Hostile As: ( 255, 0, 0 )
+Sees Neutral As: ( 255, 0, 0 )
+Sees Traitor As: ( 255, 0, 0 )
$Flags: ( "exempt from all teams at war" "orders hidden" )
$IFF Name: IFF 2
$Color: ( 255, 255, 255 )
$Attacks: ( )
+Sees Friendly As: ( 0, 0, 255 )
+Sees Hostile As: ( 0, 0, 255 )
+Sees Neutral As: ( 0, 0, 255 )
+Sees Traitor As: ( 255, 0, 0 )
$Flags: ( "exempt from all teams at war" "orders shown" )
(there is also a new "True Neutral"-IFF in the .tbl, which is blue to everyone and attacks only the "Traitor"-IFF. It only exists to reduce the use of the "Unknown" IFF in the campaign.)If you're out of contact, it will be difficult to help you solve the problem.
I would suggest seeing if there's any way to "fake it" using what already exists.
I'm also not exactly sure what you're trying to accomplish
I would use turret-set-target-priorities too if I knew what it does. There is no documentation in the wiki on it.It does nothing unless you've defined some target priority groups (http://www.hard-light.net/wiki/index.php/Objecttypes.tbl#.23Target_Priorities).
I would use turret-set-target-priorities too if I knew what it does. There is no documentation in the wiki on it.It does nothing unless you've defined some target priority groups (http://www.hard-light.net/wiki/index.php/Objecttypes.tbl#.23Target_Priorities).
So "IFF_2" is supposed to only attack bombs and strikecraft targeting it? You could create a "Targeting_IFF_2" IFF that's identical to the regular hostile (or whatever) IFF, except that "IFF_2" attacks it, with a little script that changes any strikecraft or bombs targeting "IFF_2" to that IFF,
Also, I am not sure if you can even change the IFF missiles, even with scripts.You can; Weapon.Team is its IFF value, and can be set as well as read.
Also, I am not sure if you can even change the IFF missiles, even with scripts.You can; Weapon.Team is its IFF value, and can be set as well as read.
OP, I can pass along a script whenever you like.
Well! OP, I can pass along a script whenever you like.
#Conditional Hooks
$Application: FS2_Open
$On Game Init: [
IFF_Hack = {}
IFF_Hack.From = "Hostile"
IFF_Hack.To = "Hostile#SpecialTarget"
IFF_Hack.Trigger = "IFF_2"
function IFF_Hack:OnFrame()
if self.Enabled then
local numWeapons = #mn.Weapons
for i=1, numWeapons do
local weapon = mn.Weapons[i]
if weapon and weapon:isValid() and weapon.Team.Name == self.From then
local target = weapon.Target
if target and target:isValid() and target.Team.Name == self.Trigger then
weapon.Team = mn.Teams[self.To]
end
end
end
end
end
function IFF_Hack:Enable()
self.Enabled = true
end
function IFF_Hack:Disable()
self.Enabled = false
end
]
$State: GS_STATE_GAME_PLAY
$On Frame: [
IFF_Hack:OnFrame()
]
$On Gameplay Start: [
IFF_Hack:Disable()
]
#End
IFF_Hack.From = "Neutral"
IFF_Hack.To = "Warhead"
IFF_Hack.Trigger = "Medical"
$Formula: ( when
( has-time-elapsed 0 )
( script-eval "IFF_Hack:Enable()" )
)
+Name: activate script
+Repeat Count: 1
+Interval: 1