import("ScarUtil.scar")
import("printonscreen.scar")
-------------------------------------------------
function OnGameSetup()
player1 = World_GetPlayerAt(1)
player2 = World_GetPlayerAt(2)
player3 = World_GetPlayerAt(3)
player4 = World_GetPlayerAt(4)
player5 = World_GetPlayerAt(5)
player6 = World_GetPlayerAt(6)
--A_WARNING = "Artillery barrage incomming!!!"
end
Rule_AddOneShot(green_arty1, 2)
Rule_AddOneShot(green_arty2,

Rule_AddOneShot(green_arty3, 14)
Rule_AddOneShot(green_arty4, 20)
Rule_AddOneShot(blue_arty1, 4)
Rule_AddOneShot(blue_arty2, 10)
Rule_AddOneShot(blue_arty3, 16)
Rule_AddOneShot(blue_arty4, 22)
Rule_AddOneShot(red_arty1, 6)
Rule_AddOneShot(red_arty2, 12)
Rule_AddOneShot(red_arty3, 18)
Rule_AddOneShot(red_arty4, 24)
-- Artillary warning
-- Rule_AddOneShot(arty_warning, 6)
end
Scar_AddInit(OnInit)
--[[ function arty_warning()
PrintOnScreen (A_WARNING)
-- Sound_PlayStreamed(SOUNDS.RADIOMSG1)
end
]]
-- randomabweichung
function Util_GetRandomOffset(posi, mindista, maxdista)
local newposi = posi
newposi.x = newposi.x + World_GetRand(mindista, maxdista)
newposi.z = newposi.z + World_GetRand(mindista, maxdista)
return newposi
end
function green_arty1()
local green_target1 = Util_GetPosition(Marker_FromName("green"..World_GetRand(1, 2), "green_marker"))
local arty_bling = green_target1
UI_CreateMinimapBlip(arty_bling, 4, BT_AttackHerePing)
Cmd_Ability(player1, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(green_target1), -1, 1), nil, true)
end
function green_arty2()
local green_target2 = Util_GetPosition(Marker_FromName("green"..World_GetRand(3, 4), "green_marker"))
local arty_bling = green_target2
UI_CreateMinimapBlip(arty_bling, 10, BT_AttackHerePing)
Cmd_Ability(player4, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(green_target2), -1, 1), nil, true)
end
function green_arty3()
local green_target3 = Util_GetPosition(Marker_FromName("green"..World_GetRand(5, 6), "green_marker"))
local arty_bling = green_target3
UI_CreateMinimapBlip(arty_bling, 16, BT_AttackHerePing)
Cmd_Ability(player2, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(green_target3), -1, 1), nil, true)
end
function green_arty4()
local green_target4 = Util_GetPosition(Marker_FromName("green"..World_GetRand(7, 9), "green_marker"))
local arty_bling = green_target4
UI_CreateMinimapBlip(arty_bling, 22, BT_AttackHerePing)
Cmd_Ability(player5, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(green_target4), -1, 1), nil, true)
end
function blue_arty1()
local blue_target1 = Util_GetPosition(Marker_FromName("blue"..World_GetRand(1, 2), "blue_marker"))
local arty_bling = blue_target1
UI_CreateMinimapBlip(arty_bling, 6, BT_AttackHerePing)
Cmd_Ability(player3, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(blue_target1), -1, 1), nil, true)
end
function blue_arty2()
local blue_target2 = Util_GetPosition(Marker_FromName("blue"..World_GetRand(3, 4), "blue_marker"))
local arty_bling = blue_target2
UI_CreateMinimapBlip(arty_bling, 10, BT_AttackHerePing)
Cmd_Ability(player6, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(blue_target2), -1, 1), nil, true)
end
function blue_arty3()
local blue_target3 = Util_GetPosition(Marker_FromName("blue"..World_GetRand(5, 6), "blue_marker"))
local arty_bling = blue_target3
UI_CreateMinimapBlip(arty_bling, 14, BT_AttackHerePing)
Cmd_Ability(player1, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(blue_target3), -1, 1), nil, true)
end
function blue_arty4()
local blue_target4 = Util_GetPosition(Marker_FromName("blue"..World_GetRand(7, 9), "blue_marker"))
local arty_bling = blue_target4
UI_CreateMinimapBlip(arty_bling, 18, BT_AttackHerePing)
Cmd_Ability(player4, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(blue_target4), -1, 1), nil, true)
end
function red_arty1()
local red_target1 = Util_GetPosition(Marker_FromName("red"..World_GetRand(1, 2), "red_marker"))
local arty_bling = red_target1
UI_CreateMinimapBlip(arty_bling, 8, BT_AttackHerePing)
Cmd_Ability(player2, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(red_target1), -1, 1), nil, true)
end
function red_arty2()
local red_target2 = Util_GetPosition(Marker_FromName("red"..World_GetRand(3, 4), "red_marker"))
local arty_bling = red_target2
UI_CreateMinimapBlip(arty_bling, 14, BT_AttackHerePing)
Cmd_Ability(player5, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(red_target2), -1, 1), nil, true)
end
function red_arty3()
local red_target3 = Util_GetPosition(Marker_FromName("red"..World_GetRand(5, 6), "red_marker"))
local arty_bling = red_target3
UI_CreateMinimapBlip(arty_bling, 18, BT_AttackHerePing)
Cmd_Ability(player3, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(red_target3), -1, 1), nil, true)
end
function red_arty4()
local red_target4 = Util_GetPosition(Marker_FromName("red"..World_GetRand(7, 9), "red_marker"))
local arty_bling = red_target4
UI_CreateMinimapBlip(arty_bling, 24, BT_AttackHerePing)
Cmd_Ability(player6, ABILITY.COMMANDER_TREE.ALLIES.HOWITZER_
SHOOT, Util_GetRandomOffset(Util_GetPosition(red_target4), -1, 1), nil, true)
PrintOnScreen_RemoveFromScreen( )
end
^^^ I think this should be without the music in it. although i think the coordinates will prolly be off for arnham. If that's the map with the bridge...can you make it so that you can pass under the bridge?