Jump to content

Delayed take off / player controlled


Recommended Posts

Hi, I need your expertise for a MP-mission, please.


I want to have an A10 on hold at a friendly airport. At player command the AI would take off and act as AFAC.


What's the easiest way to make this trigger player controlled? I.e. to allow the player (any player) to use the radio to command the a10 to take off.


I tried Add radio item, but it didnt show up. Also I read somewhere that this only works for the host in multiplayer.


One way would be to have a player blow up a dummy tank (it would act as a big red panic button. shoot this for help, sort of), but that's just silly.

Link to comment
Share on other sites

I have found that using Speed's SLMOD chat function is the easiest and most reliable way:



It allows any player to use the in-game chat in multiplayer to trigger flags setup in the Mission Editor.


This post may help you as well:



It seems complicated at first but isn't too difficult to use. Basically, with SLMOD installed in the correct folders, you need to create a unit somewhere on the map where it won't be destroyed and name it "scriptman". Add a triggered action to the unit: Triggered Actions -> Perform Command -> Run Script and name it something like "AFAC Script" and then type this into the script editor: slmod.chat_cmd('-AFAC Takeoff, 51)


Then create your AFAC unit and check the "Uncontrolled" box in its properties window in the Mission Editor to prevent it from taking off at mission start. Add a triggered action for that unit something like:

Triggered Actions -> Perform Command -> Start and name the triggered action something like "Activate AFAC".


In the Triggers window create two triggers like:

Once("start script")-> Time More (5) -> AI TASK("scriptman", RUN SCRIPT(1- "AFAC Script"))

Once ("AFAC Takeoff")-> Flag is True (51)-> AI TASK("the name of your AFAC triggered action")


With SLMOD running on the host computer, 5 seconds after you mission starts the host or any client will be able to type into the chat window "-AFAC Takeoff" and it will trigger Flag 51 and your AFAC will takeoff.


Hopefully that wasn't too confusing. I am not at my home computer right now so that was off the top of my head, but hopefully it will get you started if you want to use that method.

Link to comment
Share on other sites

Thanks for the recommendation :) That's indeed one way to do it. Additionally, with the minor update I put out in December, I introduced the "parallel options system" (POS) as an additional way to do this kind of thing. To add an option to the options list, use this function:


slmod.add_option( number id, string description, number flag)


where id is a unique number id for each option, description is the description on the POS options menu, and flag is the flag number you want set true. So for example:


slmod.add_option(101, 'Spawn AI AFAC Flight', 51)


will add an option to the option list with the description of "Spawn AI AFAC Flight". Now, to view the options list, one would need to type into chat "-sol" or "-SOL". To select an option on the options list, one needs to type into chat "-op#", where "#" is the item number on the options list.


If you're interested in this way of doing things, see the Slmod Beta 5.3 rev1 guide for a few more POS functions (including how to remove menu items, for example).


So anyway, one of the major advantages of the option list is that one doesn't have to enter a long chat message exactly correct to get it. The downside is that it could be easy to accidentally activate the wrong menu item. This risk is eliminated if a mission maker implements an "Are you sure? enter "y" or "n"" message and functionality using the slmod.chat_cmd function and a few additional triggers- basically, the "yes" flag operated on by the additional slmod.chat_cmd function would have to come true within like 10 seconds of the flag operated on by the POS option for the option to actually occur.


Anyway, both ways work fine, and each has its own advantage and disadvantage. For something like spawning a flight of aircraft, which you will only do once in a mission, and may be the only chat command you need to do in a mission, simply a slmod.chat_cmd could be the best way to go about it- simple, impossible to accidentally activate, and the users only ever need to enter the chat message once.

Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Thanks guys, helpful as always!


I'll try it out. Most things concerning the DCS series seems complicated at first, but once you get the hang of it.. well you know :)


So, I'll try it out and get back here in complete panic when it goes to hell :smartass:


I added the mission.



Oh, and I did manage to get radio item to work, and the AFAC to take off. Just a bugger that only the host can do this. So slmod, here I come.


Edited by maxmax
Link to comment
Share on other sites

  • Recently Browsing   0 members

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