Jump to content

Medevac script v2.0, OO approach in the works


Recommended Posts

Posted (edited)

Thanks to RagnarDa's medevac script, this forum, Internet I have learned a bit of Lua and I have taken it as my goal to make a version v2.0 using Object-oriented programming.

I have a set of goals which I will post later.

The Lua files are located here, these files are not ready for use, but if you know Lua you can try them out and make your own versions of them.

I just wanted to post a sample, the class RescueeGroup and how nifty Lua can be when OO and encapsulation is used. Lua isn't a OO language but can emulate it pretty good.

 

The file containing the class RescueeGroup is RescueeGroup_Medevac_v2.0.lua.

The script used for testing which also contains an event handler for testing is medevac_TEST.lua.

 

RescueGroup methods are :

RescueeGroup.new(spawningFromUnit, minNumberOfRescuees, maxNumberOfRescuees, includeHeavyWeapons, spawnOffset)
RescueeGroup:getGroup()
RescueeGroup:isValid()
RescueeGroup:getRescueeCount()
RescueeGroup:getLeaderPosition()
RescueeGroup:getGroupName()
RescueeGroup:getCoalition()
RescueeGroup:goToVec3Point(vec3Point, speed)
RescueeGroup:popSmoke(smokeColorNumber, delaySeconds)    
RescueeGroup:fireSignalFlare(flareColorNumber, numberOfFlaresToFire, delaySeconds)
RescueeGroup:textMessageCoalition(message, delaySeconds, durationSeconds, repeatCount)
RescueeGroup:addRadioCommandsForFireSignalFlare(groupToGetMenu)
RescueeGroup:addRadioCommandsForPopSmoke(groupToGetMenu)

medevac_2_0_test1.miz

Edited by ArturDCS
added methods for RescueeGroup
Posted
Fint! :cheer3nc::punk:

:) Thanks, yes it is going forward. Much still to do but I am getting "varm i kläderna".

 

Todays mission which is added in the first post has new methods again.

It is now possible to "communicate" with the RescueeGroup and have them fire flares by request. I will make it possible to have them pop smoke by request too. All done via the F10 menu.

 

I will take a look at the radio stuff next (I think). What would be the most realistic approach to this? Beacon? VHF? UHF? AM/FM?

Any opinions? Should an general emergency frequency be set in the script?

Posted

Pop smoke F10 menu command added. I will leave the radio VHF/UHF FM/AM stuff for now. I need some feedback for it, what is reasonable and somewhat realistic to have?

I will start working on the RescueHelicopter class.

Posted

That very good if anything can improve the 9 line medevac evacuation mesage, can be bost inmersion of helos and show some similar to JTAC A-10C mission. :)

For Work/Gaming: 28" Philips 246E Monitor - Ryzen 7 1800X - 32 GB DDR4 - nVidia RTX1080 - SSD 860 EVO 1 TB / 860 QVO 1 TB / 860 QVO 2 TB - Win10 Pro - TM HOTAS Warthog / TPR / MDF

Posted

I am stuck atm. Don't know how to proceed. Medic spawns outside helicopter alright but won't move. Goddamn it, I did a test before using ME placed infantry and they moved just fine. This one is different, he won't move no matter what. FlightMedic and RescueeGroup are the classes I've worked on, RescueeHelicopter isn't at all tested.

Posted

Make sure they are in Green alarm state or whatever it is called. Infantry never move once they go into red state.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Posted
Make sure they are in Green alarm state or whatever it is called. Infantry never move once they go into red state.

Yup green as green can be. Used your code (_controller).

Posted

Also, I think they need to be in line formation.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...