Jump to content

Is it possible to create training missions where the AI will engage you without using live ammo?


Tree_Beard

Recommended Posts

On 12/17/2021 at 12:56 AM, Tree_Beard said:

For some context, say I wanted to create a single player campaign that is sort of like a Top Gun fighter school program. I want to be able to go out and fly against AI aggressors but not actually shoot each other down.

Can this be done? 

Silly question: In the loadout for each plane - why don't you simply remove all ammo and weapons from the AI units? Does that work?

 

Link to comment
Share on other sites

You could set yourself to immortal and that would keep them from shooting you down. AFAIK, you can’t do the same for the AI. Then again, I’ve never really been interested in the latter and, so, have never looked into it.

YouTube Channel: https://www.youtube.com/channel/UCU1...CR6IZ7crfdZxDg

 

_____

Win 10 Pro x64, ASUS Z97 Pro MoBo, Intel i7-4790K, EVGA GTX 970 4GB, HyperX Savage 32GB, Samsung 850 EVO 250 GB SSD, 2x Seagate Hybrid Drive 2TB Raid 0.

Link to comment
Share on other sites

On 12/17/2021 at 10:56 AM, Tree_Beard said:

For some context, say I wanted to create a single player campaign that is sort of like a Top Gun fighter school program. I want to be able to go out and fly against AI aggressors but not actually shoot each other down.

Can this be done? 


Two potential ways you could do this:

 

1) Use the immortal option

 

2) Use a script (can't remember where it is though) that will detonate missiles just before they hit aircraft. This won't work for bullets however, so if you're wanting to include guns and not just missiles, then #1 may be the better option.

Link to comment
Share on other sites

10 hours ago, Dangerzone said:

…Use a script (can't remember where it is though) that will detonate missiles just before they hit aircraft…

That was for SAMs wasn’t it? Or did it work for all missiles?

YouTube Channel: https://www.youtube.com/channel/UCU1...CR6IZ7crfdZxDg

 

_____

Win 10 Pro x64, ASUS Z97 Pro MoBo, Intel i7-4790K, EVGA GTX 970 4GB, HyperX Savage 32GB, Samsung 850 EVO 250 GB SSD, 2x Seagate Hybrid Drive 2TB Raid 0.

Link to comment
Share on other sites

Well, you can simply create an onEvent() processor that triggers on the 1 event (shot). Look at the weapon in the event, and if the weapon.target is a player, simply delete the weapon. That way, all missiles fired at a player disappear in pixel dust 🙂

Something like this (untested, written free-hand). Must add to your world event handlers:

guardianAngel = {}
function guardianAngel:onEvent(event)
	local ID = event.id	
	if ID == 1 then 
		-- someone shot something. see if it is fired at a player 
		local theWeapon = event.weapon 
		if not theWeapon then return end -- ignore
		theTarget = theWeapon:getTarget() 		
		if not theTarget then return end 
		if not theTarget:isExist() then return end 
		
		-- if we get here, we have weapon fired at a target
		local playerTarget = theTarget:getPlayerName()
		if not playerTarget then return end
		-- if we get here, a weapon was fired at player 
		
		-- say "hey!"
		trigger.action.outText("Tsk, Tsk, Tsk. Weapon fired at " .. playerTarget .. " begone!", 30)
		-- destroy it		
		theWeapon:destroy()
		-- all is well
	end
end

 


Edited by cfrag
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, Ironhand said:

That was for SAMs wasn’t it? Or did it work for all missiles?

I thought it was all missiles, but could be wrong. If not - it could be tweaked. CFRAG has shown how it can be done above. The only difference is that the script I saw allowed the missile to get close first to allow practicing of evasive maneuvers and notching. 

For me - I'd use invincible. You know if you've been hit so it's better for practicing - but if the idea is to create a 'top gun' training center sort of experience with simulated weapons instead - then that may not be the best approach. 

Link to comment
Share on other sites

  • 3 weeks later...

I did create the first mission for an NTTR F-5E aggressor campaign that is currently on hold.  In this particular mission you carry out a FAM navigation exercise that shows the western 'red' entry corridor from the west and crosses airspace where other Aggressor F-5Es are in a series of mock engagements with Aussie F/A-18Cs before exiting via the eastern blue corridor - all using correct navigation procedures. 

To accomplish the mock dogfight engagement I set trigger zones at waypoints which both flights of aircraft would fly to at either end of the (Caliente Alpha?) airspace and provide ready status, all this with radio calls on the frequency.  Once both sets are checked in the call is made "fight's on" and they head towards the engagement area with immortal set on.  If either side get a hit then a "kill notification" is made and all the relevant comms ie "knock it off" and the immortal setting is removed with a delay (I found if it was immediate the aircraft would go mortal while the explosion or cannon rounds were still going).  If both sides still have ammunition they return to the start points and report ready and go again.  If the hard deck is broken then that triggers a knock it off, as well as a bingo fuel or winchester call.

If by some twist an aircraft goes down in all this the comms go crazy with trying to communicate and locate the mission aircraft and a SAR helicopter launches from Tonopah.

It was pretty cool sitting back watching it all happen, the idea of it being you will be on frequency while the fight is occurring and hearing all the chatter while transitting at low level but if you look up you might see some action high above.

Sadly though there is no way of doing this without live weapons.  It would be nice if they did add simulated weapons into the sim given thats the whole point of the NTTR.

Sorry for lack of detail though but I haven't touched this mission in quite some time.

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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