Steinmarder
|
« Reply #41 on: May 02, 2008, 04:04:31 pm » |
|
Working fine!
And here it is, if someones interested in checking it out:
- Random artillery around 4 scar markers in a set intervall (firing 5 single howitzer shells on each)
- Warning message displayed before the fire comes in.
- MiniMap combat ping along with the warning on the scar marker positions (-> center of the barraged area)
[warning text is still a workaround though, as i didnt implement the actual EiR warnings, but it works the same way just another command]
import("ScarUtil.scar") import("printonscreen.scar")
function OnGameSetup()
player1 = World_GetPlayerAt(1) player2 = World_GetPlayerAt(2) player3 = World_GetPlayerAt(3) player4 = World_GetPlayerAt(4)
Rule_AddInterval(artyshower,240)
SINGLE_HOWITZER = BP_GetAbilityBlueprint("abilities/sp_single_howitzer.lua")
end
function OnInit()
end
function artyfire() Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_1, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_2, 40)) Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_3, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_4, 40)) end
function artyfire2() Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_1, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_2, 40)) Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_3, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_4, 40)) end
function artyfire3() Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_1, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_2, 40)) Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_3, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_4, 40)) end
function artyfire4() Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_1, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_2, 40)) Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_3, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_4, 40)) end
function artyfire5() Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_1, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_2, 40)) Cmd_Ability(player1, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_3, 40)) Cmd_Ability(player2, SINGLE_HOWITZER, Util_GetRandomPosition(mkr_4, 40)) end
function artyshower()
PrintOnScreen("WARNING, ARTILLERY INCOMING!!")
UI_CreateMinimapBlip(mkr_1, 8, BT_CombatPing) UI_CreateMinimapBlip(mkr_2, 8, BT_CombatPing) UI_CreateMinimapBlip(mkr_3, 8, BT_CombatPing) UI_CreateMinimapBlip(mkr_4, 8, BT_CombatPing)
Rule_AddOneShot(artyfire,5) Rule_AddOneShot(artyfire2,7) Rule_AddOneShot(artyfire3,9) Rule_AddOneShot(artyfire4,11) Rule_AddOneShot(artyfire5,13)
Rule_AddOneShot(PrintOnScreen_RemoveFromScreen, 15)
end
|