Jump to content

Recommended Posts

Posted

Hey guys,

 

i just want to know how to activate a group or unit via script.

I'd try so much differend things, i dont know what do do anymore.

I neither found any information in the official lua guide nor in the mission files itself where i put a trigger which was activating a group (that command just output an error message)

I know there is already such a thread, but maybe someone knows the answer now.

 

greets Hawkins

Posted

The scripting wiki page is accurate for the current functions built into the simulator. http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine_(DCS:_World_1.2.1)

 

The only way to activate stuff in via script is to make a trigger condition be true which will activate a group. For example flags are accessible in the scripting engine, so one can set the triggers up for "flag x = y" > activate group, and the script can set the value of x to equal y. Once the 1.2.3 patch is out there will be an expression condition which allows for lua scripts to execute trigger actions.

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
Once the 1.2.3 patch is out there will be an expression condition which allows for lua scripts to execute trigger actions.

 

Really!?!?!? :D:D:D

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Posted

That could be extremely interesting if the action could be done on "self", without creating a specific script per group. But even as it could be as specific, it's a really powerful tool. It's a start on creating expecting "behaviours" on ground groups... that could be copied out from mission to mission.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Posted

Its literally a text box that is similar to "Do Script" that shows up in the trigger conditions. A rather simple example would be:

 

Once>Expression(If trigger.misc.getUserFlag(1) == true then return true end)>Group Activate

 

Obviously you can do so much more with it. But a practical usage would be to eliminate flags entirely and replace flags with named global variables. But generally its a nice middle ground for things you can't do with scripting or for things you want to use triggers for, but easily enhance with scripting. Its basically a "make your own trigger condition" box.

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

  • 2 weeks later...
Posted

Sorry for the late reply :)

Yeah expressions would be the solution for my problem.

 

I need this because i want to realize a mission where you can buy units with points.

 

Im trying to make a gameplay similar to Wargame European Escalation.

-You have to capture areas (with MHQs only) to gain points over time. (that part is working fine.) <<- but thats all i got at the moment :3

 

-With 1.2.3 you can use Recon units ( KA27/OH58 ) to spot units.

-Buy additional units with points (Question)

-form convoys of supply trucks (to bring additional weapons to the airport or build defenses in the captured areas(Question!))

im thinking of some kind of town defense. once you have captured an area, you could buy tanks and stuff to drive it down there, or you could bring the supply trucks there (maybe you have to cap. and hold the area for 10min) to build some static (Question ^^)defense, infantry, zu23

 

just some ideas to make the game more interesting.

 

Now, the questions :)

-is it possible to make some kind of 'buy menue' for the commanders?

first i did it with the F10 options (but there is the 'only for host' problem

then i did it with the slmod and the option list, its working fine, the optionlist is kinda tricky to manage, but its working :)

BUT, the problem with that is, its accessible for everyone on the side, and i need it only for the commander.

so, is there any other way to realize that?

 

-is it possible to switch the 'spawn point' of units from A to B and back before they spawn? 'mission task?'

if you know Wargame, there its possible to call in new units from more than one point, and im thinkin about the possibility to switch the 'spawnpoints' in dcs too.

Another idea: How about troop transporters? is it possible to attach the spawnpoint to an unit or triggerzone?

 

-is it possible to change specific values of a warehouse with a trigger activation?

so there could be another use for supply trucks

"airport warehouse ran out of mavericks, okay, ammunition convoy is on the way ETA 30 minutes" i think that could get very interesting :)

 

-is it somehow possible to teleport static objects?

im thinking about building a FOB or a roadblock

 

 

btw. sorry for my possibly poor english ^^

Posted

Pretty much the answer to most of your questions is "no, but its on a wishlist." Different spawn locations, custom UI features, and manipulating warehouses are features that have been asked for. It is up to the developers to decide when the add in the functionality if at all.

 

Think of the mission task as a cross between a combined arms ground commander and the default path (task) you give a group. Once the group is active within the scenario it can be given new orders via the mission task.

 

-is it somehow possible to teleport static objects?

im thinking about building a FOB or a roadblock

 

Technically yes. But right now it only works in Single player or the host in multiplayer.

 

http://en.wiki.eagle.ru/wiki/Drafts/Simulator_Scripting_Engine_(1.2.2)/Part_2#Static

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

  • Recently Browsing   0 members

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