# --Master-ARCTarget-- 2/5/2018 3:31:47 PM #Created by Bluebolt #this goes on a core that won't die somewhere $startingAutoFire:1 #autoFire starts active. if exlusiveAutoFire is active, this value is what autoFire WILL BE the entire game $forceAutoFire:0 #player wont be able to manually target, but can still turn auto fire on/off $exclusiveAutoFire:0 #player cant control the modules at all. constantly autofire once 1 OperateWhilePaused Self 0 SetUnitTakeMapSpace Self "main" "NONE" SetImage Self "main" "Ships" SetImageLayer Self "main" 5 SetImageOrder Self "main" 3 3 SetImageScale Self 0 0 SetUnitPixelCoords -1 ->closestBertha 0 ->berthaSelected -1 ->closestRail 0 ->railSelected <-startingAutoFire ->*autoFireActive endonce Self 0 0 SetUnitPixelCoords if(<-selected) Self "main" "Custom9_128" SetImage #targeting reticule. color is determined by what thing is targeting. Self "main" GetMousePosition 100 SetImagePosition if(<-berthaSelected) Self "main" 200 255 255 150 SetImageColor if(<-closestBertha "Bertha.prpl" "berthaLoaded" GetScriptVar eq0) @findBerthas endif endif if(<-railSelected) Self "main" 200 200 255 150 SetImageColor if(<-closestRail "RailCannonMOD.prpl" "railLoaded" GetScriptVar eq0) @findRails endif endif else Self "main" "NONE" SetImage endif if("SPACE" GetKeyDown "ESCAPE" GetKeyDown or)#user cancel 0 ->berthaSelected 0 ->railSelected 0 ->selected endif if(0 GetMouseButtonDown)#time to fire! or not. idc GetMousePosition ->mY ->mX if(<-berthaSelected) <-closestBertha "Bertha.prpl" "mX" <-mX SetScriptVar <-closestBertha "Bertha.prpl" "mY" <-mY SetScriptVar <-closestBertha "Bertha.prpl" "targeting" 1 SetScriptVar 0 ->berthaSelected 0 ->selected endif if(<-railSelected) <-closestRail "RailCannonMOD.prpl" "mX" <-mX SetScriptVar <-closestRail "RailCannonMOD.prpl" "mY" <-mY SetScriptVar <-closestRail "RailCannonMOD.prpl" "targeting" 1 SetScriptVar <-closestRail "RailCannonSpinalMOD.prpl" "mX" <-mX SetScriptVar <-closestRail "RailCannonSpinalMOD.prpl" "mY" <-mY SetScriptVar <-closestRail "RailCannonSpinalMOD.prpl" "targeting" 1 SetScriptVar 0 ->railSelected 0 ->selected endif endif if("X" GetKeyDown <-exclusiveAutoFire not <-forceAutoFire not and and) #auto FIRE TIME <-*autoFireActive not ->*autoFireActive if(<-*autoFireActive) trace("Player Auto Firing Enabled") endif endif if(<-selected not <-exclusiveAutoFire not and) if("B" GetKeyDown) #BPbertha conflicts if(<-berthaSelected not) @findBerthas endif endif if("R" GetKeyDown) if(<-railSelected not) @findRails endif endif endif :findBerthas #"berthaLoaded" 1 GetCoresWithVar -1 ->closestBertha do("berthaLoaded" 1 GetCoresWithVar 0) #does not output a list *cry* # if(<-berthas[I] "Bertha.prpl" "loaded" GetScriptVar) ->potentialBertha if(<-potentialBertha "Bertha.prpl" "IsEnemy" GetScriptVar not) if(I eq0) <-potentialBertha ->closestBertha else if(<-potentialBertha GetUnitPixelCoords GetMousePosition Distance <-closestBertha GetUnitPixelCoords GetMousePosition Distance lte) <-potentialBertha ->closestBertha endif endif endif # endif loop if(<-closestBertha -1 neq) 1 ->berthaSelected 1 ->selected else 0 ->berthaSelected 0 ->selected endif :findRails #"railLoaded" 1 GetCoresWithVar -1 ->closestRail do("railLoaded" 1 GetCoresWithVar 0) #does not output a list *cry* # if(<-berthas[I] "Bertha.prpl" "loaded" GetScriptVar) ->potentialRail if(<-potentialRail "RailCannonMOD.prpl" "IsEnemy" GetScriptVar <-potentialRail "RailCannonSpinalMOD.prpl" "IsEnemy" GetScriptVar or not) if(I eq0) <-potentialRail ->closestRail else if(<-potentialRail GetUnitPixelCoords GetMousePosition Distance <-closestRail GetUnitPixelCoords GetMousePosition Distance lte) <-potentialRail ->closestRail endif endif endif # endif loop if(<-closestRail -1 neq) 1 ->railSelected 1 ->selected else 0 ->railSelected 0 ->selected endif