Tomcat84 -> Lua in Command tutorial 2 (12/8/2014 7:04:50 PM)
|
Hey all, I've made another tutorial in closed beta showcasing some of the new Lua functionality that the 1.06 patch brings to Command. Compared to the first tutorial this one goes more in depth on practical usage of some of the new Lua functions and also shows a few non-Lua related tricks that you can use to build better scenarios. The functionality mostly applies to scenario designers as it gives more tools to build an interesting AI opponent. So if you only play scenarios and dont build any you might find it less interesting, but still, you could get an idea of what you can face in future scenarios. You can find the video tutorial HERE Functionality showcased in this tutorial is as follows: - Making a CAP change mission to become more aggressive once approached - Having a 50% chance of an AWACS being added when the scen is loaded - Removing radar information from fighters when the Fighter HQ is bombed (permanently or coming back online after X amount of minutes) - Making tanks become detectable to the player side when crossing into an area - Making those tanks retreat once they reach a certain amount of damage together - Randomizing whether an SA-2 site is dumb with radar on or smart with radar off and a prosecution area at scen load - Randomly adding either an SA-3, SA-6 or SA-8 at a location - Randomly adding either an SA-3, SA-6 or SA-8 at a location with 40% chance for 3 or 6 and 20% for the 8 - Randomizing which CAPs a group of MiG-29s goes to - Having the weather improve over time with slight amount of randomness - Showing how to have a strike mission marshal somewhere first before - Randomly selecting which target they go to. - A few things with the EW radars - Having SAMs go active once too many EW Radars are taken out - Having SAMs go active when the SAM HQ is bombed - Having SAMs go passive again when HQ backup is online after X minutes, UNLESS they were already active because EW radars were taken out You can also find some info on how the scripts work on Baloogan's site: http://wiki.baloogancampaign.com/index.php/CommandLua as well as this great documentation by CKFinite: http://commandlua.github.io/ I hope you enjoy this tutorial and find it useful. Other than that let it also be noted that more Lua improvements are either included already in 1.06 or in the works for future patches, and this tutorial does not cover all of them. Lastly let me note again for now that the attached scenarios are NOT COMPATIBLE with your current public build. You'll have to wait ever so briefly until 1.06 is released very soon! :) But once you have it, you'll find there is one base scenario that the tutorial starts with, and one completed one that has everything setup and which you can reference in case something doesn't work, as well as a txt document with the scripts. The video features time links to the parts that cover specific scripts in the description (hit show more) in case my excessive talking bores you and at the start in the video itself. One important thing to note about the scripts as they are used in this tutorial is that if a unit dies and is then called upon in a script, there will be an error and any units after it in the script wont get their command. So if going exactly by this tutorial, try to think about whether a unit might die or not before the Lua event is executed. One possible workaround example is posted by Baloogan here: http://forum.baloogancampaign.com/viewtopic.php?f=10&t=87
|
|
|
|