Toni Carrera Posted December 7, 2021 Posted December 7, 2021 Hi Fellow ME's, I have Immortal set to on at mission start for an AI unit. What I want to be able to do is after some time, or by way of trigger entry of a different aircraft, remove the immortal from the other AI unit Anyone know how I can achieve this without MOOSE or MIST, I have not cracked either yet Thank you Toni Carrera (Ice Rhino) ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors
Chump Posted December 7, 2021 Posted December 7, 2021 local unit = Unit.getByName("unitNameThatYouWant") if unit then local controller = unit:getController() if controller then local SetImmortal = { id = 'SetImmortal', params = { value = false } } controller:setCommand(SetImmortal) end end
Toni Carrera Posted December 7, 2021 Author Posted December 7, 2021 Thank you Chump. I assume this goes in a trigger script, or does it go in the LUA Predicate of advanced waypoint actions? Toni Carrera (Ice Rhino) ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors
Chump Posted December 8, 2021 Posted December 8, 2021 You could put this in a ONCE trigger, or an external LUA file. You could use timer.scheduleFunction() if written in LUA, or just set a condition in the mission editor trigger. Let me know if you need syntax help.
Toni Carrera Posted December 9, 2021 Author Posted December 9, 2021 Hi Chump Thank you, and yes, I would appreciate some help as offered Thanks Toni Carrera (Ice Rhino) ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors
feefifofum Posted December 10, 2021 Posted December 10, 2021 There is no need to venture into .LUA land here unless you are already inclined to do so. You can used the triggered actions tab to include a perform command -> immortal on/off trigger which can be activated by any standard means (TIME MORE, UNIT INSIDE ZONE, etc.) Use an AI TASK PUSH trigger to toggle the setting. THE GEORGIAN WAR - OFFICIAL F-15C DLC
Toni Carrera Posted December 10, 2021 Author Posted December 10, 2021 Thanks FFFF Will give that a try later on Thanking you Toni Carrera (Ice Rhino) ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors
Recommended Posts