Title: Adding event artillery to maps Post by: salan on February 21, 2009, 06:58:04 pm trying to find that post where it shows the scar for adding all that artillery to maps at the start.. anyone know where it is?
Title: Re: Adding event artillery to maps Post by: Khorney on February 21, 2009, 07:12:04 pm tbh, i dunno if i like the script, i'm not entirely sure what it is supposed to add, apart from a harder time for the defenders 9unless that is the point =P)
Title: Re: Adding event artillery to maps Post by: Tymathee on February 21, 2009, 07:38:11 pm just look at St Come Du Mont and see if you can find it there i guess
found this in st come du mont in the .scar file. Title: Re: Adding event artillery to maps Post by: salan on February 21, 2009, 07:44:21 pm I was looking through there, trying to piece it together without the music .. getting there.
gotta blow up some of arnhem. Title: Re: Adding event artillery to maps Post by: EscforrealityTLS on February 21, 2009, 08:05:59 pm Nice one with Arhem by the way Salan, might I make a suggestion though. Delete some of the crap in it that is not needed, it tends to lag my lame ass computer.
Oh and the pink is so you! Title: Re: Adding event artillery to maps Post by: Tymathee on February 21, 2009, 08:22:42 pm well...
Title: Re: Adding event artillery to maps Post by: Tymathee on February 21, 2009, 08:25:06 pm 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, 8) 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? Title: Re: Adding event artillery to maps Post by: salan on February 21, 2009, 08:49:12 pm I was thinking of erasing the bridge tbh, making it broken right at the base so you can get around the north end of it.
it limits the map to much being there. Title: Re: Adding event artillery to maps Post by: Tymathee on February 21, 2009, 09:16:01 pm definiately. i just played it a while ago and i spawned on that side of the map omg it was so annoying
Title: Re: Adding event artillery to maps Post by: Kolath on February 23, 2009, 10:04:58 am I got the that artillery script workin on 8p_lengfeld by copy pasting the SCAR and adding the requisite markers. You add SCAR markers in the worldbuilder by clicking the little red flag icon. Make sure you select the right colors and that you rename the markers to match what is in the script (or vice versa).
If anyone could explain how to add more shots of artillery to the script, I would really appreciate it. As all the things I tried caused fatal scar errors. Title: Re: Adding event artillery to maps Post by: Unkn0wn on February 23, 2009, 10:06:19 am I heard we have the wrong version of lengfeld in?
In addition, I'd like to use airplanes passing by on maps like Arras, if anyone has an idea on how this could be done. Title: Re: Adding event artillery to maps Post by: LeoPhone on February 23, 2009, 10:08:00 am planes passing by while game is going on, GOGO WIBLE blow the plane and crash it in those emplacements ;D
to make it working, you just need to use recon runs and luft air arty strike that dont have an enemy Title: Re: Adding event artillery to maps Post by: Steinmarder on February 26, 2009, 04:51:41 pm This is a pretty simple script I wrote myself for artillery incoming every 240 seconds, landing around 4
different markers with a random offset to the position every shot lands. Can be done way shorter if you take other functions and some variables, but this should be good for you to figur out how its done. Note that the artillery belongs to the players 1 and 2 here, so its not optimal but enough for artillery in the beginning (replace AddInterval with AddOneShot in line 12). If you dont know how your markers are called, you can check for that in the mapname_ID.scar file. Quote 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 |