Broadsword Posted October 16, 2009 Share Posted October 16, 2009 I'm in the home stretch of tweaking a SP mission. I'm trying to set up US (the player army) artillery support so it becomes available three or more times during the session. The player needs several opportunities to hit an advancing Panzer spearhead and slow it down, knock out a few tanks, to buy time for reinforcements to arrive. What's the best way to do this? Should I have one trigger for US artillery support, and have it called three separate times at various points during the battle? Or should I have three separate artillery support triggers, and call each one separately? I want this artillery support to be truly massive firepower, too. Suggestions? Link to comment Share on other sites More sharing options...
Gnasher Posted October 16, 2009 Share Posted October 16, 2009 Providing the player has no control over the arty. I'd suggest setting up several more Allied armies & just giving them Arty support capability. Set up a rect for each of these army's arty to hit, maybe the rects should overlap if you want shock & awe! Here's some code that might help:_ SetWorkArmy ( Army , 3 ) ArtSupportChangeState ( 3 , ENABLE ) ArtSupportCall ( 3 , RECT , "army3_arty_rect" ) Delay ( 50 ) SetWorkArmy ( Army , 4 ) ArtSupportChangeState ( 4 , ENABLE ) ArtSupportCall ( 4 , RECT , "army4_arty_rect" ) Delay ( 50 ) SetWorkArmy ( Army , 5 ) ArtSupportChangeState ( 5 , ENABLE ) ArtSupportCall ( 5 , RECT , "army5_arty_rect" ) etc etc etc........ Or you might want to dynamically define your target rects using the CreateRectByObject command like this:- SetWorkArmy ( Army , 3 ) CreateRectByObject ( RECT , "Mortar Rect" , 100 , ARMY , 1 , HUMAN , 2 , NO_PANIC ) MortarSupportChangeState ( 3 , ENABLE ) MortarSupportCall ( 3 , RECT , "Mortar Rect" ) Of course you could always just let the player call down the arty by letting them have the calls but you won't be able to get the shock & awe that multiple arty strikes will achieve. I would strongly recommend testing extensively as this is a potentially major frame rate hitter. HTH Link to comment Share on other sites More sharing options...
Broadsword Posted October 17, 2009 Author Share Posted October 17, 2009 Thanks, Gnasher! This multiple-armies technique worked like a charm. The frame rate hit isn't bad, either. Now all I have to do is keep tweaking the time delays to get the shells to fall in the right spot at the right time. Link to comment Share on other sites More sharing options...
Recommended Posts