Search the Community
Showing results for tags 'mission script'.
-
DCS Scripting API Prototypes — TGFB Edition info This utility allows for more efficient and cleaner code so, help you make better scripted missions! With this you will gain the ability to lookup and see all functions available to you in the DCS Mission Scripting API. You will get function auto-completion so you will always know what param a function wants/needs. It will also warn you for sketchy nil and Mission Scripting errors so my advice if you see a "warning" in your file you better check that out and fix it to prevent bugs and unintended fun!! The original idea as far as i can see was from 'asherao' Installation and download -> HERE TGFB Info Website: tgfb-dcs.com Discord Feel free to join the TGFB Discord or visit or website to stay up-to-date with my latest projects, mission and tools Enjoy using this tool!! This tool is updated for DCS version : "2.9.19.13478" Credit : - Hoggit Discord - asherao See Screenshot EXAMPLES :
-
- scripting
- missionscripting
- (and 12 more)
-
Unlike the "Uncontrolled", this option is to make an AI helicopter start its engine but not yet proceed to its waypoint. Just stay still, on the ground. It's easy for planes to put obstacles to block AI from taxiing. For an AI helicopter, it will try to take off and proceed to the waypoint right after its engine is running. This option is very useful when creating a scenario that from mission start, a group of helos preparing, loading & embarking while their rotors are still spinning, taking off right after some conditions are met. I know there is a way to spawn them in air and let them land right after. But I think letting them land from the beginning looks better and it's easy for creators to put static objects or units around them. It will be better to have optional setting to open the cargo doors like "LAND - COMBAT LANDING".
-
Don't know when this happened, but I think it's very recent, but the event is no longer firing for either player aircraft skill level set to PLAYER or set to CLIENT. Attached are two missions using the same script (one for Single Player one for CLIENT/MP) If you look at the dcs.log you'll see that the event never fires. SinglePlayerSpawn.mizClientPlayerSpawn.miz Here's the script, it's loaded in each mission file by the DO SCRIPT command: MSB = { ["Version"] = "1.0.0" } function MSB:onEvent(event) env.info("MSB:onEvent Handler ENTERED", false) if event.id == world.event.S_EVENT_SHOT then env.info("MSB/OnEvent: ******* S_EVENT_SHOT *******", false) elseif event.id == world.event.S_EVENT_HIT then env.info("MSB/OnEvent: ******* S_EVENT_HIT *******", false) elseif event.id == world.event.S_EVENT_TAKEOFF then env.info("MSB/OnEvent: *******************************", false) env.info("MSB/OnEvent: ******* S_EVENT_TAKEOFF *******", false) env.info("MSB/OnEvent: *******************************", false) elseif event.id == world.event.S_EVENT_LAND then -- TODO env.info("MSB/OnEvent: ****************************", false) env.info("MSB/OnEvent: ******* S_EVENT_LAND *******", false) env.info("MSB/OnEvent: ****************************", false) elseif event.id == world.event.S_EVENT_CRASH then env.info("MSB/OnEvent: ******* S_EVENT_CRASH *******", false) elseif event.id == world.event.S_EVENT_EJECTION then -- TODO env.info("MSB/OnEvent: ********************************", false) env.info("MSB/OnEvent: ******* S_EVENT_EJECTION *******", false) env.info("MSB/OnEvent: ********************************", false) elseif event.id == world.event.S_EVENT_REFUELING then env.info("MSB/OnEvent: ******* S_EVENT_REFUELING *******", false) elseif event.id == world.event.S_EVENT_DEAD then env.info("MSB/OnEvent: ****************************", false) env.info("MSB/OnEvent: ******* S_EVENT_DEAD *******", false) env.info("MSB/OnEvent: ****************************", false) elseif event.id == world.event.S_EVENT_PILOT_DEAD then env.info("MSB/OnEvent: **********************************", false) env.info("MSB/OnEvent: ******* S_EVENT_PILOT_DEAD *******", false) env.info("MSB/OnEvent: **********************************", false) elseif event.id == world.event.S_EVENT_BASE_CAPTURED then env.info("MSB/OnEvent: ******* S_EVENT_BASE_CAPTURED *******", false) elseif event.id == world.event.S_EVENT_MISSION_START then env.info("MSB/OnEvent: *************************************", false) env.info("MSB/OnEvent: ******* S_EVENT_MISSION_START *******", false) env.info("MSB/OnEvent: *************************************", false) elseif event.id == world.event.S_EVENT_MISSION_END then env.info("MSB/OnEvent: ******* S_EVENT_MISSION_END *******", false) elseif event.id == world.event.S_EVENT_TOOK_CONTROL then env.info("MSB/OnEvent: ******* S_EVENT_TOOK_CONTROL *******", false) elseif event.id == world.event.S_EVENT_REFUELING_STOP then env.info("MSB/OnEvent: ******* S_EVENT_REFUELING_STOP *******", false) elseif event.id == world.event.S_EVENT_BIRTH then env.info("MSB/OnEvent: *****************************", false) env.info("MSB/OnEvent: ******* S_EVENT_BIRTH *******", false) env.info("MSB/OnEvent: *****************************", false) elseif event.id == world.event.S_EVENT_HUMAN_FAILURE then env.info("MSB/OnEvent: ******* S_EVENT_HUMAN_FAILURE *******", false) elseif event.id == world.event.S_EVENT_DETAILED_FAILURE then env.info("MSB/OnEvent: ******* S_EVENT_DETAILED_FAILURE *******", false) elseif event.id == world.event.S_EVENT_ENGINE_STARTUP then env.info("MSB/OnEvent: ******* S_EVENT_ENGINE_STARTUP *******", false) elseif event.id == world.event.S_EVENT_ENGINE_SHUTDOWN then env.info("MSB/OnEvent: ******* S_EVENT_ENGINE_SHUTDOWN *******", false) elseif event.id == world.event.S_EVENT_PLAYER_ENTER_UNIT then -- DOESN'T WORK FOR MP AND 'NEVER WILL' /FFS env.info("MSB/OnEvent: *****************************************", false) env.info("MSB/OnEvent: ******* S_EVENT_PLAYER_ENTER_UNIT *******", false) env.info("MSB/OnEvent: *****************************************", false) elseif event.id == world.event.S_EVENT_PLAYER_LEAVE_UNIT then env.info("MSB/OnEvent: ******* S_EVENT_PLAYER_LEAVE_UNIT *******", false) elseif event.id == world.event.S_EVENT_PLAYER_COMMENT then env.info("MSB/OnEvent: ******* S_EVENT_PLAYER_COMMENT *******", false) elseif event.id == world.event.S_EVENT_SHOOTING_START then env.info("MSB/OnEvent: **************************************", false) env.info("MSB/OnEvent: ******* S_EVENT_SHOOTING_START *******", false) env.info("MSB/OnEvent: **************************************", false) elseif event.id == world.event.S_EVENT_SHOOTING_END then env.info("MSB/OnEvent: ******* S_EVENT_SHOOTING_END *******", false) elseif event.id == world.event.S_EVENT_MARK_ADDED then env.info("MSB/OnEvent: ******* S_EVENT_MARK_ADDED *******", false) elseif event.id == world.event.S_EVENT_MARK_CHANGE then env.info("MSB/OnEvent: ******* S_EVENT_MARK_CHANGE *******", false) elseif event.id == world.event.S_EVENT_MARK_REMOVED then env.info("MSB/OnEvent: ******* S_EVENT_MARK_REMOVED *******", false) elseif event.id == world.event.S_EVENT_KILL then env.info("MSB/OnEvent: ******* S_EVENT_KILL *******", false) elseif event.id == world.event.S_EVENT_SCORE then env.info("MSB/OnEvent: ******* S_EVENT_SCORE *******", false) elseif event.id == world.event.S_EVENT_UNIT_LOST then env.info("MSB/OnEvent: ******* S_EVENT_UNIT_LOST *******", false) elseif event.id == world.event.S_EVENT_LANDING_AFTER_EJECTION then env.info("MSB/OnEvent: ******* S_EVENT_LANDING_AFTER_EJECTION *******", false) elseif event.id == world.event.S_EVENT_PARATROOPER_LENDING then env.info("MSB/OnEvent: ******* S_EVENT_PARATROOPER_LENDING *******", false) elseif event.id == world.event.S_EVENT_DISCARD_CHAIR_AFTER_EJECTION then env.info("MSB/OnEvent: ******* S_EVENT_DISCARD_CHAIR_AFTER_EJECTION *******", false) elseif event.id == world.event.S_EVENT_WEAPON_ADD then env.info("MSB/OnEvent: ******* S_EVENT_WEAPON_ADD *******", false) elseif event.id == world.event.S_EVENT_TRIGGER_ZONE then env.info("MSB/OnEvent: *****************************************", false) env.info("MSB/OnEvent: ******** S_EVENT_TRIGGER_ZONE *******", false) env.info("MSB/OnEvent: *** S_EVENT_TRIGGER_ZONE ***", false) env.info("MSB/OnEvent: ******** S_EVENT_TRIGGER_ZONE *******", false) env.info("MSB/OnEvent: *****************************************", false) elseif event.id == world.event.S_EVENT_LANDING_QUALITY_MARK then env.info("MSB/OnEvent: ******* S_EVENT_LANDING_QUALITY_MARK *******", false) elseif event.id == world.event.S_EVENT_BDA then env.info("MSB/OnEvent: ******* S_EVENT_BDA *******", false) elseif event.id == world.event.S_EVENT_AI_ABORT_MISSION then env.info("MSB/OnEvent: ******* S_EVENT_AI_ABORT_MISSION *******", false) elseif event.id == world.event.S_EVENT_DAYNIGHT then env.info("MSB/OnEvent: ******* S_EVENT_DAYNIGHT *******", false) elseif event.id == world.event.S_EVENT_FLIGHT_TIME then env.info("MSB/OnEvent: ******* S_EVENT_FLIGHT_TIME *******", false) elseif event.id == world.event.S_EVENT_PLAYER_SELF_KILL_PILOT then env.info("MSB/OnEvent: ******* S_EVENT_PLAYER_SELF_KILL_PILOT *******", false) elseif event.id == world.event.S_EVENT_PLAYER_CAPTURE_AIRFIELD then env.info("MSB/OnEvent: ******* S_EVENT_PLAYER_CAPTURE_AIRFIELD *******", false) elseif event.id == world.event.S_EVENT_EMERGENCY_LANDING then env.info("MSB/OnEvent: ******* S_EVENT_EMERGENCY_LANDING *******", false) elseif event.id == world.event.S_EVENT_UNIT_CREATE_TASK then env.info("MSB/OnEvent: ******* S_EVENT_UNIT_CREATE_TASK *******", false) elseif event.id == world.event.S_EVENT_UNIT_DELETE_TASK then env.info("MSB/OnEvent: ******* S_EVENT_UNIT_DELETE_TASK *******", false) elseif event.id == world.event.S_EVENT_SIMULATION_START then env.info("MSB/OnEvent: ****************************************", false) env.info("MSB/OnEvent: ******* S_EVENT_SIMULATION_START *******", false) env.info("MSB/OnEvent: ****************************************", false) elseif event.id == world.event.S_EVENT_WEAPON_REARM then env.info("MSB/OnEvent: ******* S_EVENT_WEAPON_REARM *******", false) elseif event.id == world.event.S_EVENT_WEAPON_DROP then env.info("MSB/OnEvent: ******* S_EVENT_WEAPON_DROP *******", false) elseif event.id == world.event.S_EVENT_UNIT_TASK_TIMEOUT then env.info("MSB/OnEvent: ******* S_EVENT_UNIT_TASK_TIMEOUT *******", false) elseif event.id == world.event.S_EVENT_UNIT_TASK_STAGE then env.info("MSB/OnEvent: ******* S_EVENT_UNIT_TASK_STAGE *******", false) elseif event.id == world.event.S_EVENT_MAC_SUBTASK_SCORE then env.info("MSB/OnEvent: ******* S_EVENT_MAC_SUBTASK_SCORE *******", false) elseif event.id == world.event.S_EVENT_MISSION_RESTART then env.info("MSB/OnEvent: ******* S_EVENT_MISSION_RESTART *******", false) elseif event.id == world.event.S_EVENT_MISSION_WINNER then env.info("MSB/OnEvent: ******* S_EVENT_MISSION_WINNER *******", false) elseif event.id == world.event.S_EVENT_POSTPONED_TAKEOFF then env.info("MSB/OnEvent: ******* S_EVENT_POSTPONED_TAKEOFF *******", false) elseif event.id == world.event.S_EVENT_POSTPONED_LAND then env.info("MSB/OnEvent: ******* S_EVENT_POSTPONED_LAND *******", false) elseif event.id == world.event.S_EVENT_MAX then env.info("MSB/OnEvent: ******* S_EVENT_MAX *******", false) end end function MSB.Initialise() world.addEventHandler(MSB) env.info("MSB LOADED", false) end MSB.Initialise()
-
This script can RANDOMLY generate CAS missions in a specific zone. "Random" means the location is randomly chosen, the 9-line is randomly generated and the target is also random.(However in finite choices actually...but you can customize it.) There is a demo mission with radio voice generated by AI in the attachment below. You can use those sound files in your own missions freely with the script(change 'miz' to 'zip' if you don't know how to see things inside a miz file). When you use the script in your own mission, you'll need to create zones and groups like what I did in the demo mission...So it's very important to check out the demo mission first if you want to customize the script. All of the interactions are through the F10 radio menu. You need to enter the mission zone first, and then use radio menu to get yourself assigned with a mission. Then follow the 9-line briefing, report IP inbound. After you have been cleared hot, kill the target and request BDA. The JTAC will tell you if the mission has been accomplished. If you want to try it in an online server, you can go to 36.150.108.238:10320. But the radio commands are in Chinese. Below are some screenshots (the 9-line is telling you that the target is marked by laser and red smoke, this is also randomly generated) null null null null null CAS-demo.miz InfiniteCAS_Release_v1.0.lua
-
- 3
-
-
- cas
- mission editor
-
(and 3 more)
Tagged with: