Author Topic: Airstrikes  (Read 1666 times)

0 Members and 1 Guest are viewing this topic.

Offline Drewbs

  • 24
Hey guys, I have been tweaking the game a bit and I wanted to buff airstrikes, but I can't find them. What files control them?

 

Offline Drewbs

  • 24
And as a more important question, can I script airstrikes?

I figure if the Aerospotter can call them in, there must be a way to do it with a script.

 

Offline Drewbs

  • 24
I am assuming one of the many people who have viewed this has some knowledge of the core coding in the game.


So I have this snippet from aerospotter brain code that I think sends the airstrike:
CallStrikeEx(508,-1,AttackPoint[0],AttackPoint[1],-1.0,TRUE,6.0);

BUT, when I try to plug it in to mission script it does not work. Any advice?

Any idea what 508 is for? or any of those other numbers besides the attack coords?

 
The numbers are coordinates - when IT works like MC1 - i think it does - airstrikes are to find in mission.abl Files, so they ARE Part of Script/scripted.
It has become appalingly obvious that our technology has exceeded our humanity.

Albert Einstein

 

Drewbs;

here are the definition details for this scripting command in MC2X; maybe that helps you.

callstrikeEx(striketype, -1, xpos, ypos, -1.0, true, time);

calls a strike to a specific location

integer striketype: 0 = demolitioncharge, 1= airstrike, 2 = sensorstrike
integer -1 (do not change !)
real xpos: x coordinate for strike
real ypos: y coordinate for strike
real -1.0 (do not change !)
bool true (do not change !)
real time 15.0 for demolition charge, 0.0 for airstrike snd sensorstrike
Example: callstrikeEx(1, -1, bombspot[0], bombspot[1], -1.0, true, 0.0);


 

Offline Drewbs

  • 24
Thanks for the breakdown!

Unfortunately, it is not working when I try to implement it. Here is the simple version of what I have:

static boolean    LopAAA;

function init;
       code
LopAAA = TRUE;
endfunction;

//     Main Code
      code
if (LopAAA) then
   CallStrikeEx(1, -1, 235, -1600, -1.0, true, 0.0); //This is the line# ref. in error message
   LopAAA = False;
endif;


I get an error saying:

STOP    :  SYNTAX ERROR data\missions\a_aaa_test.abl [line 82] - (type 16) Incompatible types "callstrikeex"

Do I need to define a strike up top as a boolean or an integer?

 
I am not into MC1..., thus I can not really help.
Try command callstrike instead of CallStrikeEx. Both commands exist in the MC2 code.
Beside this the striketype originally refers to a package number inside object2.pak defining the striketype.
This is similar but different in MC2 then in other MC versions.
Striketype may be 508 in your case.
« Last Edit: April 05, 2018, 07:35:44 am by wolfman-x »

 
I understood Hes doing it for MC2.  :eek:
It has become appalingly obvious that our technology has exceeded our humanity.

Albert Einstein

 

Offline Drewbs

  • 24
Yes, MC2 or well, MCO. I will dig in to that .pak and see what I can figure out.

(I got that original 508 number from the brain file for an aerospotter on the Baxter's Gambit mission of the Carver V campaign)

 
I won't inspire object.pak that much. Better analyze all mission files of missions with automated airstrikes... find the lines and compare them... this mostly gives me the answers I need.
It has become appalingly obvious that our technology has exceeded our humanity.

Albert Einstein

 
Drewbs,

your little script works perfectly in MC2X if you you just modify the location input data format.
 
CallStrikeEx(1, -1, 235.0, -1600.0, -1.0, true, 0.0);

I do not see, why that should not work in MCO as well; code is same regarding this.

My prior definitions are correct for both beside there is no demolition charge in MCO.

I tested it under MCO as well, works as expected. Demolition charge for MCO calls airstrike.
« Last Edit: April 06, 2018, 10:15:04 am by wolfman-x »

 
Hey Wolfman-X, i bet one beer that this was his last post  :D
It has become appalingly obvious that our technology has exceeded our humanity.

Albert Einstein

 

Offline Drewbs

  • 24
Sorry for the slow response, I was working on different levels. I will try again, but if having decimal points if the difference I am gonna slap myself. And no Rizzen, I will be posting more, I am making a campaign and I am sure I will have other questions.
« Last Edit: April 08, 2018, 01:30:30 am by Drewbs »

 

Offline Drewbs

  • 24
Son
of
a
*****.

Yep that worked! Now I know I need the .0 on things and yall aren't just putting it there just because. You rock Wolfman!

 
It´s a bit ago since i worked last time on mission scripts im sry i didn´t pointed it out. Welcome back, i gues i owe Wolfman-X a cold one ^^ - im excited for your Campaign!
It has become appalingly obvious that our technology has exceeded our humanity.

Albert Einstein

 
Let the airstrikes hail down now. :nod: