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


Notices

Reply
 
Thread Tools Display Modes
Old 01-03-2020, 12:21 PM   #1871
Kappa
Member
 
Kappa's Avatar
 
Join Date: Oct 2014
Location: Italy
Posts: 164
Default

Quote:
Originally Posted by Hardcard View Post
@Kappa

You almost got it, but you seem to be missing another important concept.

Code:
RecceSet:ForEachGroup( 

   function (RecceGroup) -- RecceGroup represents each GROUP OBJECT contained in RecceSet. Consider it a GROUP object 
 	RecceGroupName = RecceGroup:GetSetName() -- This isn't a valid method for a GROUP object, it'll error. Also, the correct syntax is GetSetNames(), in plural

        -- Simply get the name of each group in the usual way:
        RecceGroupName = RecceGroup:GetName() 

        local SpawnRecce = SPAWN:New(RecceGroupName)
       :InitLimit(1,0)
       :InitRepeatOnLanding()
       :InitDelayOff()
       :SpawnScheduled(10,0)
    end
    )

Keep in mind that the script I wrote uses standard Lua for loops, which is why I had to use :GetSetNames() in order to get all the group names in the set.
Your script uses MOOSE iterators (fancier for loops), which allow you to work directly with the MOOSE objects in the set, so you can just get the names using typical MOOSE methods.
Hardcard I want to thank you so much.

I will use this knowledge to help other mission designers using MOOSE in a simplier way thanks to the use of prefixes.

__________________
--


36° Stormo Virtuale - Italian Virtual Flight Community
www.36stormovirtuale.net
Kappa is offline   Reply With Quote
Old 01-07-2020, 04:21 PM   #1872
Kappa
Member
 
Kappa's Avatar
 
Join Date: Oct 2014
Location: Italy
Posts: 164
Default

Hi again,

is it possible to use something like CTLD wpzones in MOOSE?

How to manage groups after they are unboarded froma a helicopter?
__________________
--


36° Stormo Virtuale - Italian Virtual Flight Community
www.36stormovirtuale.net
Kappa is offline   Reply With Quote
Old 01-08-2020, 08:49 AM   #1873
xplod
Junior Member
 
Join Date: Nov 2018
Location: Germany - NRW
Posts: 6
Default 2 Questions

I am currently digging into MOOSE Framework, and the new features like the AIRBOSS is working fine.


But somehow I've got the feeling that I doesn't understand the DCS LUA Interface:


1.) For all clients, I want to set the bullseye as Waypoint 1. Is this possible at mission start? It looks like Waypoints have to be in the mission file and can only be swapped, but not added. Is this correct?


2.)

I want my scripts to be as generic as possible. Therefore I want to
a) get a list of airports
b.) foreach airport

-> Search for "Airportname_GCI" -> If present, assign GCI Task
-> Search for "Airportname_CAP" -> If present, assign CAP Task

...


In Moose, there's a SET_AIRPORT Class, but I get all the Airports on all maps. Is it easily possible to get an actual list of red and blue airports? Or do I have to go through all airports, do a "find" and than check coalition?


Best regards,
_X_
xplod is offline   Reply With Quote
Old 01-14-2020, 02:16 AM   #1874
Delta99
Member
 
Delta99's Avatar
 
Join Date: Jan 2017
Posts: 420
Default

Just a quick response:

1. You cannot set client waypoints at all within the scripting framework.

2. SET_AIRBASE should only be giving you airbases on the current map as far as I know.

Quote:
Originally Posted by xplod View Post
I am currently digging into MOOSE Framework, and the new features like the AIRBOSS is working fine.


But somehow I've got the feeling that I doesn't understand the DCS LUA Interface:


1.) For all clients, I want to set the bullseye as Waypoint 1. Is this possible at mission start? It looks like Waypoints have to be in the mission file and can only be swapped, but not added. Is this correct?


2.)

I want my scripts to be as generic as possible. Therefore I want to
a) get a list of airports
b.) foreach airport

-> Search for "Airportname_GCI" -> If present, assign GCI Task
-> Search for "Airportname_CAP" -> If present, assign CAP Task

...


In Moose, there's a SET_AIRPORT Class, but I get all the Airports on all maps. Is it easily possible to get an actual list of red and blue airports? Or do I have to go through all airports, do a "find" and than check coalition?


Best regards,
_X_
__________________
My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Delta99 is offline   Reply With Quote
Old 01-14-2020, 01:00 PM   #1875
Dispatch
Member
 
Join Date: Apr 2018
Location: East Coast USA
Posts: 199
Post

Hey Guys,

Looking to create a standard server setup for missions.


Meaning

3 aircraft Groups of 4 spawned in Ramps
and get res-pawned after take off.
(in case of destroyed, so client can restart)


Would Moose do something like that?
Where should I look.....

Thanx
__________________
~

Last edited by Dispatch; 01-14-2020 at 03:36 PM.
Dispatch is offline   Reply With Quote
Old 01-14-2020, 04:24 PM   #1876
xplod
Junior Member
 
Join Date: Nov 2018
Location: Germany - NRW
Posts: 6
Default

Quote:
Originally Posted by Dispatch View Post
Would Moose do something like that?
Where should I look.....
No. Placing units is done in the mission editor. You can use Moose to spawn existing, hidden ("late activation") units.


Currently, I didn’t find anything you can do with client planes, except Menu items...
Scripting is mostly done for AI units...
__________________

Currently used modules:
- F16 Viper(primary)
- F/A 18 Hornet , F-5E Tiger, L-39, C-101 for fun
- (many more unused but great modules :-) )
xplod is offline   Reply With Quote
Old 01-14-2020, 04:55 PM   #1877
Dispatch
Member
 
Join Date: Apr 2018
Location: East Coast USA
Posts: 199
Default

Thank You xplod,
__________________
~
Dispatch is offline   Reply With Quote
Old 01-15-2020, 01:28 AM   #1878
Delta99
Member
 
Delta99's Avatar
 
Join Date: Jan 2017
Posts: 420
Default

I'm not exactly sure what the request is but if you are NOT talking about client aircraft then you can do what you are looking to do with Moose of course and a ton more.

Nothing with any scripting can mess with client spawns so you are out of luck there.

Quote:
Originally Posted by Dispatch View Post
Hey Guys,

Looking to create a standard server setup for missions.


Meaning

3 aircraft Groups of 4 spawned in Ramps
and get res-pawned after take off.
(in case of destroyed, so client can restart)


Would Moose do something like that?
Where should I look.....

Thanx
__________________
My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Delta99 is offline   Reply With Quote
Old 01-15-2020, 02:39 AM   #1879
Tiramisu
Member
 
Join Date: Oct 2018
Location: Germany
Posts: 521
Default

It is unfortunate, that we can only respawn Player-slots, but no Client-slots. I did a test-mission in multiplayer and my script was able to respawn my own Player-slot, but I think this would not work with more than one player. I wonder how DCS is deciding which player is in the Player-slot. Is it the host of the server? If it was possible to convert a Client-slot to the new Player-slot during the mission, then this would allow a workaround for Client-respawns.
Tiramisu is offline   Reply With Quote
Old 01-17-2020, 01:39 AM   #1880
Pikey
Veteran
 
Pikey's Avatar
 
Join Date: Sep 2009
Location: Reading, UK (GMT)
Posts: 3,773
Default

No, there is only ONE"Player" type unit. Client type units you can have multiple. Player is more accessible to scripting, you can destroy Players, get cockpit arguments, have random failures of equipment, see the training gates, do tutorial lessons with cockpit indicators like the training missions, have access to do things like turning on radar to override WOW, developer arguments, all sorts of good things.

Clients operate as a very limited locked down player. Player slots do not appear on a MP server, a Player takes control immediately on spawning into the mission, of whatever the unit is with the player skill level set in the mission editor.
If you attempted to edit the skill level in the miz file from "Client" to "Player" probably bad things would happen because DCS doesnt know what slot to push you into. You would probably sit in spectators and have no slots to join at all. But feel free to test that, if that's your wish. There is no circumvention of the basic game design of DCS, this has been the way since it was first made.
What you ask for is what many people have asked for.

Quote:
Originally Posted by Tiramisu View Post
It is unfortunate, that we can only respawn Player-slots, but no Client-slots. I did a test-mission in multiplayer and my script was able to respawn my own Player-slot, but I think this would not work with more than one player. I wonder how DCS is deciding which player is in the Player-slot. Is it the host of the server? If it was possible to convert a Client-slot to the new Player-slot during the mission, then this would allow a workaround for Client-respawns.
__________________
___________________________________________________________________________
SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * PLAYLIST
===========
Pikey is offline   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 08:21 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.