Maverick-X Posted March 15, 2014 Posted March 15, 2014 Sorry, I guess that's kind of a stupid question, but I can't get it to work: I want to set up a Buk site that is ordered to weapon hold until enemy units are in a specific zone. So I created trigger that reacts to coalition units in that area. My advanced WP-action for the Buk site now looks like this: 1.: RoE = Weapon Hold 2.: Alarm State = Red 3.: RoE = Weapons Free /?; Condition is User Flag = true The flag changes to true but nothing happens. I unchecked the box for value=true and the RoE were set to Weapons Free immediatly, as ofc the flag is false on start. My best guess is, that the wp-actions are only checked at the moment the WP is reached. So at mission start the trigger is false -> RoE not changed. As the RoE setting is an Option and not a Task, I can't set it as a trigger. If I am correct this far, I'd guess aswell that I would have to do this with a script... As I never touched lua scripts before, I'd be thankful if someone took the time and post an example on how to do this or a wiki where I can get all functions I need. Thanks, Mav
ENO Posted March 15, 2014 Posted March 15, 2014 Had a bunch of trouble with this myself... Please see this post about pushing tasks- http://forums.eagle.ru/showpost.php?p=2001172&postcount=3 If you have "ongoing" tasks set in your advanced waypoint options, that bottom task can't seem to get back to the stage... it just doesn't do anything. Try switching a condition from one to the other and it's like it can't get through the other ongoing waypoint action. Anyway, the task push / triggered actions described above in the other post will allow you to push the task- whatever it is- and you may need to set it to push weapon hold on and off with your flag conditions. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Maverick-X Posted March 15, 2014 Author Posted March 15, 2014 Thank you for the quick response, got it now. It seems so obvious, now that I see how the push task is handled, but is this new since 1.2.7? I recall this a bit different... But explains why the tanker wont start up with the flag I had set, guess that's the same issue
ENO Posted March 15, 2014 Posted March 15, 2014 Hmmm might be a different issue. Want to post the mission maybe I could take a look under the hood. No promises but if it's just triggers and not scripts I'm pretty handy. As for new or not- I don't think it's new... not for quite a few versions. There is a task set and a task push... don't remember which is new but I think the setup is the same. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Maverick-X Posted March 15, 2014 Author Posted March 15, 2014 Thanks for the offer. The issue with the tanker was in an old mission and it stopped working after the update. If I can't get it to work, I'll be glad if you'd had a look for it.
ENO Posted March 15, 2014 Posted March 15, 2014 And you did the standard "resave mission in current version trick?" Sometimes it helps to save it under a different name too (ie: tanker mission a.miz / tanker mission b.miz etc. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Grimes Posted March 15, 2014 Posted March 15, 2014 It seems so obvious, now that I see how the push task is handled, but is this new since 1.2.7? I recall this a bit different... But explains why the tanker wont start up with the flag I had set, guess that's the same issue Push task was added with 1.2.4 or there-abouts, while set task has been in there for quite a while. The 'start' command for airplanes is broken right now. The AI set and push tasks should work in every other instance though. The 'triggered actions' is what you would want to use for that anyways. All of the waypoint commands are checked when the group crosses a waypoint. For stationary groups or for the first waypoint it checks the commands at mission start. It goes through them one at a time, and will execute each one of the conditions are true, if the condition isn't true it ignores it. But like I said it only checks it when the groups hits that waypoint. Triggered actions on the other hand can be triggered whenever you want. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
ENO Posted March 15, 2014 Posted March 15, 2014 Thing is Grimes- it seems that let's say I put an "invisible" task on... the next things often don't happen because invisible is always the current task- it doesn't go to the next one. Whether it's for invisible or something else that lasts long term... it just seems that it can't get over that first action... Is that a known issue? Are we supposed to be putting these things in a particular order to avoid such conflicts? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Grimes Posted March 15, 2014 Posted March 15, 2014 Commands and options should be instant, while the actual tasking takes time to complete. There was a problem in the past where options and commands weren't being completed as soon as they should be, but I believe that was fixed. Which version were you having that issue in? The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
ENO Posted March 16, 2014 Posted March 16, 2014 The current one. At least that's what I think is happening. I've since started putting waypoints closer together to assign different tasks and then realized I can task push so to be honest I don't have a living, breathing example of this behavior to deploy (I don't think). Should be easy enough to duplicate. Actually come to think of it the issue with my zsu23s not firing may be an example worth referencing. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Recommended Posts