Jump to content

Recommended Posts

Posted (edited)

Hey all. Meant to do this on release day but been swamped. Not a whole lot on the scripting side was added, but there are a few nice things in there. Some of this applies to patches for 2.2 but I'm including it mostly for the sake of completeness.

 

lua predicate in the triggers should now be fixed.

land.getClosestPointToRoads added

land.findPathOnroads added

Mark panels have 2 new variables

A few countries were added: "ALGERIA" ,"KUWAIT", "QATAR" ," OMAN", UNITED_ARAB_EMIRATES"

Activate Static trigger action added.

Scenery Objects remove trigger added.

 

The activate static I think is WIP as there doesn't seem to be a way to set a static to not be active.

 

The mark triggers also have the commands. For one reason or another the functions are crashing the sim as of the first release of the 2.5 open beta. It is reported.

 

Ive attached a few screenshots of the new land functions in action. As you can see it can return A TON of entries to the table even for a short distance. It honestly looks like it is using the same code to create the "spans" that get saved with a route in the editor. Needless to say the longer and curvy the route the more points there are. In the shorter example it returned 110 entries. On the longer one it returned 710 points of a 45km route from about halfway between Senaki and Kutasi to the town of Ochamchira.

 

 

Also I got some clarity on a few functions that exist but had some unknown syntax on. When I get some time I will test it out and add it to the wiki. Mostly stuff like the following that have to do with cargo and troop transport: coalition.checkDescent, coalition.getAllDescents, coalition.checkChooseCargo

 

 

2.5.1

Functions for accessing mark panels.

- world.getMarkPanels()

- 3 event handlers for add, change, and removal of mark panels.

 

Trigger to create large smoke effects

trigger.action.effectSmokeBig()

short_distance.thumb.png.ad0822844e02ff84b70c65d5cf3666f4.png

rainbow_road.thumb.png.4af4fa85d44b9d3bb73fd1d05b21669b.png

Edited by Grimes
  • Like 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
lua predicate in the triggers should now be fixed.

 

About time, have needed this since 1.2 some time

 

A few countries were added: "ALGERIA" ,"KUWAIT", "QATAR" ," OMAN", UNITED_ARAB_EMIRATES"

 

Now if we can get W.Germany and GDR added...

Posted

Grimes - for the function findPathOnroads, does it return the road positions in order (from start to dest) or is the order returned random?

 

Just curious if I can do something like roads[#roads / 2] to get the midway point between the two positions.

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Posted

I think it is in order but I didn't spend a lot of time to confirm it. Basically I just iterated through the smoke colors and spawned a smoke at each point. It certainly looked like all the smokes were in the same pattern.

 

The middle entry for the roads table isn't a guarantee that it is the actual midpoint for the route. As you can see from the first screenshot the vast majority of the returned values are in the background. The middle entry would probably be closer to 3/4 through the route. To find the actual middle you'd probably need to calculate the distance between each point, get the halfway distance, then find the nearest point along the route to it.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Grimes,

 

Where would be the best place to suggest a enhancement to land.getSurfaceType? With the introduction of 2.5 and trees / forests playing a much larger role in LOS etc, knowing if the land area is in a forest could be extremely useful when spawning units (ie. might not want to spawn units in the middle of the forest). I haven't done extensive testing but with some of my missions units are now spawned in a forest. I'm not sure they are able to shoot out of the forest and of course they are much harder if not impossible to find.

 

In any event, the mission designer might want to spawn either in or out of a forest. If it is possible to determine this in the DCS engine it would be great to have such an enum returned with this function.

Posted

I already made a request for functionality like that. Also for finding the nearest building to a point and if a point is inside a building. Hopefully it'll get implemented.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

 

lua predicate in the triggers should now be fixed.

 

 

FlightControl seems to be happy if that is true :D I remember how disappointed he was when he said in his Moose video tutorials that this was a known issue since >2 years :D

 

attachment.php?attachmentid=179016&stc=1&d=1518517228

221442371_ScreenShot2018-02-13at11_19_53.png.ba1a97d42192c2335a9e5577b6b43c9e.png

DCS 2.5 Open Beta Nevada - Golf - A-10C - AV-8BNA - CA - F-15C - F/A-18C - Ka-50 - MiG-29 SA342 - Su-25T - SU-33 - TF-51D - UH-1H - :pilotfly:!

 

Windows 10 Prof - Ryzen 2700X - ASUS ROG STRIX X470-F GAMING - Palit GeForce Super JeStream 1080 TI on 34" LG curved monitor @ 3440x1440 - 32GB RAM @ 3200Mhz - Thrustmaster Hotas Warthog - Saitek Pedals - 2 x 7" LCD behind Thrustmaster MFDs

  • 2 months later...
Posted

DCS 2.5.1 has added a few functions for accessing mark panels. Its already available in the open beta build that is currently live.

 

world.getMarkPanels()

event: S_EVENT_MARK_ADDED

event: S_EVENT_MARK_CHANGE

event: S_EVENT_MARK_REMOVED

 

 

I've added documentation on it to the updated hoggit wiki. I don't know when that wiki will replace the old one. So eventually the URL will probably change. Links have been edited to the first post above.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Should have been able to add it as a static object previously, but I've never tried it. However yes there is new trigger action for that type of smoke. Tested and figured out the input parameters.

 

trigger.action.effectSmokeBig()

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
However yes there is new trigger action for that type of smoke. Tested and figured out the input parameters.

trigger.action.effectSmokeBig()

Thanks Grimes, great news :thumbup: FYI, I think the enumerator numbering is slightly off. It should start at zero (small smoke and fire) and end at seven (huge smoke).

A warrior's mission is to foster the success of others.

i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Posted
I based if off of how it shows up in the .miz file with the trigger. Which is 1-8.

Okay, I see. Maybe "enum smoke preset" should be defined somewhere more clearly (or I missed that).

 

I tried 1-8 first and got a "shifted" result because

 trigger.action.effectSmokeBig(vec3, [b]0[/b], density)

gives the small smoke and fire.

A warrior's mission is to foster the success of others.

i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Posted
Try creating the smoke as an effects static object and then removing it.

 

Sorry I am at a bit inexperienced, can you elude as to how to do this please ?

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Posted

Doesn't matter, it appears to be bugged.

 

But under static objects there is a new type called "Effects" which allows you to spawn in smoke. There are also a few other types that appear to be WIP still. The general idea would be to spawn it like any other static object via scripting and then be able to remove it whenever you choose to via Object.destroy().

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Thanks grimes, I take it a bug report has been raised and fingesr crossed they could fix it ... soonish

 

Would be handy to be able to enable / disable this .... thinking forest fire operations in helis

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

  • Recently Browsing   0 members

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