资源描述:
《闪电战1脚本script函数说明汉化》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、游戏脚本这里我们用LUA脚本语言编写脚本。(主页是http://www.lua.org/网上的最新版是5.1版)点这下载。以下内容参考了坛上一位朋友的文章,在此表示感谢。自定义函数:RunScriptSuicideKillScriptGetNUnitsInCircleGetNUnitsInAreaGetNScriptUnitsInAreaGetNUnitsInScriptGroupLandReinforcementWinDrawLooseGiveCommand,CmdGiveQCommand,QCmdShowActiveScriptsChangeWarFogEnableA
2、viationDisableAviationChangePlayerGodSetIGlobalVar,SetFGlobalVar,SetSGlobalVarGetIGlobalVar,GetFGlobalVar,GetSGlobalVarGetObjectHPsGetNUnitsInPartyGetNUnitsInPartyUFGetNUnitsInPlayerUFChangeFormationTraceDisplayTraceObjectiveChangedGetNAmmoGetPartyOfUnitsDamageObjectGetUnitStateGetSquadIn
3、foIsFollowingGetFrontDirGetActiveShellTypeRandomFloatRandomIntlocatedintheTomb,DongShenJiabang,deferthenextdayfocusedontheassassination.Linping,Zhejiang,1ofwhichliquorwinemasters(WuzhensaidinformationisCarpenter),whogotAfewbayonets,duetomissedfatal,whennightcameGetMapSizeIsPlayerPresentGe
4、tObjCoordGetScriptAreaParamsSwitchWeatherSwitchWeatherAutomaticGetNUnitsInSideAddIronManDeleteReinforcementViewZoneIsStandGroundIsEntrenchedGetAviationState单位指令动作代码:(联系下文Cmd与QCmd)0–强制移动(Q)1–攻击单位2–攻击非单位物体3–移动攻击(A)4–装载单位5–卸下单位6–进入建筑/堑壕7–离开建筑/堑壕8–旋转9–停止所有动作13–停止并进入戒备状态50–站岗14–埋伏15–校准射击(X)16–
5、火力压制(Z)19–召唤轰炸机20–召唤战斗机21–召唤侦察机22–召唤伞兵机36–召唤攻击机23–补给单位24–修理单位29–使用双筒望远镜31–挂载火炮32–部署火炮34–解散步兵班35–形成编队39–跟随43–补给士兵45–筑垒防护locatedintheTomb,DongShenJiabang,deferthenextdayfocusedontheassassination.Linping,Zhejiang,1ofwhichliquorwinemasters(WuzhensaidinformationisCarpenter),whogotAfewbayonets,
6、duetomissedfatal,whennightcame46–切换弹药种类脚本文件举例:(我们必须用“Base”给敌军单位定义脚本区域,我们用脚本代码100来消灭所有单位。)functionToWin()if(GetNUnitsInScriptGroup(100)<=0)thenWin(0);Suicide();end;end;functionTobeDefeated()if(GetNUnitsInArea(1,"Base")>1)thenLoose();Suicide();end;end;functionInit()RunScript("ToWin",3000);R
7、unScript("TobeDefeated",3000);end;自定义函数详细讲解:RunScriptRunScript(脚本函数名称(字串),运行周期(单位毫秒),[,重复执行次数(可以不定义,即默认为无限循环)];举例:RunScript("Objective12",3000,3);SuicideSuicide();如果在通过RunScript执行的函数主体调用Suicide,此函数在完成后将不再重复运行。KillScriptKillScript(脚本函数名称);消除已激活(至少执行一次)的特定脚本函数名称的脚本语句。