MOOSE - Mission Object Oriented Scripting Framework - Page 145 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 01-12-2019, 05:25 AM   #1441
marginal
Junior Member
 
Join Date: Dec 2015
Location: Canada
Posts: 13
Default Dual CAP script

This script works. I think part of the problem with my previous attempt was the type of redfor aircraft which flew in the area outside the engage zone were detecting the bluefor CAP coming up and setting up for attack by flying into the engage zone irregardless the track they were supposed to fly.

In this demo mission 2 enemy aircraft remain clear of the engage zone and 2 enter the zone. The two which enter are shot down, the two which remain clear are not shot down.

2 CAP aircraft groups will fly via this script. DODGE and CHEVY will launch depending on the triggers you've built in the mission editor. They won't engage aircraft that have not flown into the engage zone. Once the enemy aircraft have flown into the engage zone they will pursue and attack.

I'm planning on using this script to launch a CAP at mission start, then launch a second CAP later in the mission using whatever trigger is necessary.

I want to create more of a "big battle" environment by setting up similar scripts for SEAD and CAS aircraft as well as ground units.
Attached Files
File Type: lua DUAL CAP.lua (2.7 KB, 22 views)
File Type: miz DUAL CAP.miz (727.6 KB, 8 views)
marginal is offline   Reply With Quote
Old 01-12-2019, 09:25 AM   #1442
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 271
Default

The script you posted contains some interesting tricks, thanks for sharing!



Well-intentioned remark:
Spoiler:
Quote:
Originally Posted by marginal View Post
zone irregardless the track they were supposed to fly.
Irrespective = Not respective

Regardless = Without regard

Irrespective + Regardless = Irregardless (Double negative!)

Negative + negative = affirmative --> not + without = with

So...

Irregardless = not + without + respect/regard = WITH respect/regard


You can try mixing other synonyms of the same type in order to see the problem more clearly.

For instance:

- Irresponsible + Reckless = Irreckless?

Irreckless = not + without + responsibility/reck (aka care) = WITH responsibility/reck (aka care)


- Unkind + Heartless = Unheartless?

Unheartless = not + without + kindness/heart = WITH kindness/heart


-Unabashed + Shameless = Unshameless?

Unshameless = not + without + abashment/shame = WITH abashment/shame


-Unrepentant + Remorseless = Unremorseless?

Unremorseless = not + without + repentance/remorse = WITH repentance/remorse

etc.

Like scripting languages, actual languages are also governed by logic (for the most part )
Hardcard is offline   Reply With Quote
Old 01-12-2019, 12:09 PM   #1443
Habu_69
Member
 
Join Date: Jul 2011
Location: USA VA
Posts: 597
Default

Re DUAL CAP.lua: is it necessary to repeat the PatrolZone = ZONE:New() and EngageZoneGroup instantiations? If so, why?
Habu_69 is offline   Reply With Quote
Old 01-12-2019, 04:44 PM   #1444
Delta99
Member
 
Delta99's Avatar
 
Join Date: Jan 2017
Posts: 364
Default

Quote:
Originally Posted by Habu_69 View Post
Re DUAL CAP.lua: is it necessary to repeat the PatrolZone = ZONE:New() and EngageZoneGroup instantiations? If so, why?
No.

Although an issue I see with this script is that the second AICapZone is definitely going to step on the 1st AICapZone. In other words it will be extremely lucky if CAP 1 will actually work properly. They might start out looking like it but at some point will likely break down.

Those global variables should be different. Also just notice CapPlane also clashes. This is ripe for breaking for certain. I am surprised if it works really. And it might seem to work for the initial stage but for any longer than that unlikely.

It would be fine to write the Patrol zone stuff once as I mentioned above. It is similar for both so no need to redefine it. Just wasting CPU cycles and redefining variables to be the exact same thing.

One further thing. The RTB and fuel settings that are part of AICAPZONE will likely override what you set in the editor. So I would test those as well. You can set both with methods on AICapZone.
__________________
My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements

Last edited by Delta99; 01-12-2019 at 04:48 PM.
Delta99 is offline   Reply With Quote
Old 01-12-2019, 06:34 PM   #1445
Habu_69
Member
 
Join Date: Jul 2011
Location: USA VA
Posts: 597
Default

Hopefully marginal takes these comments as constructive criticism. I am not sure what he means by the comment "SET UNCONTROLLED" in the script file. Perhaps he means LATE ACTIVATION. The script comments also state: "In trigger menu: add "perform command - start"", which I do not understand.


I usually hesistate to comment on someone else's work, as I am certainly no expert. Yesterday I spent about 4 hours testing to determine why this code would not destroy MiG group:


Code:
BanditGrp21:Spawn()
  BanditGrp21:Destroy()

Finally discovered I needed a container:

Code:
TestBandit = BanditGrp21:Spawn()
TestBandit:Destroy()
Habu_69 is offline   Reply With Quote
Old 01-12-2019, 07:33 PM   #1446
Delta99
Member
 
Delta99's Avatar
 
Join Date: Jan 2017
Posts: 364
Default

Quote:
Originally Posted by Habu_69 View Post
Hopefully marginal takes these comments as constructive criticism.
Agreed, that is how they are intended.
__________________
My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Delta99 is offline   Reply With Quote
Old 01-13-2019, 12:39 AM   #1447
marginal
Junior Member
 
Join Date: Dec 2015
Location: Canada
Posts: 13
Default

Quote:
Hopefully marginal takes these comments as constructive criticism. I am not sure what he means by the comment "SET UNCONTROLLED" in the script file. Perhaps he means LATE ACTIVATION. The script comments also state: "In trigger menu: add "perform command - start"", which I do not understand.
Nope, I mean "set uncontrolled" and "perform command - start". This is how I get the AI aircraft to spawn on mission start but do nothing until a "start" is triggered in mission editor usually by a time(more) but several methods to trigger the start could be used. I found that these two settings will allow me to do that.


I'm certainly no expert at lua coding, I'm modifying demo missions for my own use then running them thru ME.



Quote:
The RTB and fuel settings that are part of AICAPZONE will likely override what you set in the editor. So I would test those as well. You can set both with methods on AICapZone.
I'd like to build RTB and fuel settings into the lua script and move away from having to do it in ME. Also build a time(more) delay into the lua. Can you show me how?


Thanks,
M
marginal is offline   Reply With Quote
Old 01-14-2019, 09:01 PM   #1448
Delta99
Member
 
Delta99's Avatar
 
Join Date: Jan 2017
Posts: 364
Default

Quote:
Originally Posted by marginal View Post
Nope, I mean "set uncontrolled" and "perform command - start". This is how I get the AI aircraft to spawn on mission start but do nothing until a "start" is triggered in mission editor usually by a time(more) but several methods to trigger the start could be used. I found that these two settings will allow me to do that.


I'm certainly no expert at lua coding, I'm modifying demo missions for my own use then running them thru ME.




I'd like to build RTB and fuel settings into the lua script and move away from having to do it in ME. Also build a time(more) delay into the lua. Can you show me how?


Thanks,
M
There are many different ways to spawn based on logic or timing etc so it really depends on what you are really trying to accomplish. Using "set uncontrolled" and "perform command start" are likely going to mess with Moose as well. I wouldn't mix the two. But I could be wrong on that.

I would look at https://flightcontrol-master.github....ore.Spawn.html specifically the section on delaying the initial spawn. Might be useful to you.

Look here for managing fuel threshold: https://flightcontrol-master.github....NE).ManageFuel
__________________
My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Delta99 is offline   Reply With Quote
Old 01-18-2019, 01:05 PM   #1449
Tiramisu
Member
 
Join Date: Oct 2018
Location: Germany
Posts: 198
Default

Is the newly announced dynamical campaigns system going to incorporate MOOSE? Or is ED going to develop something totally different?
Tiramisu is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:06 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.