Sabreliner Posted September 13, 2022 Posted September 13, 2022 Hello, I am trying to get a pushaitask function to work and it is driving me crazy. I have a tanker named Boom1. I set up 4 triggered actions for this tanker with varying speeds and altitudes. I can activate any of them using the GUI interface but not with MIST. Here is my script: local B1 = missionCommands.addSubMenu("Tanker Boom1", nil) missionCommands.addCommand("Altitude 5000", B1,function() trigger.action.pushAITask(Boom1, 1) end, nil) I have tried setting Boom1 in the above line in double quotes as well to no avail. Is there something wrong with my syntax? Alan
toutenglisse Posted September 13, 2022 Posted September 13, 2022 8 hours ago, Sabreliner said: ...Is there something wrong with my syntax? Alan Hi, the correct syntax is : missionCommands.addCommand("Altitude 5000", B1, trigger.action.pushAITask, Group.getByName('Boom1'), 1)
Sabreliner Posted September 13, 2022 Author Posted September 13, 2022 Toutenglisse, THANK YOU, THANK YOU, THANK YOU! This was driving me crazy! Alan
Recommended Posts