Jump to content
Sign in to follow this  
mandoble

Mando Missile ArmA for ArmA 2

Recommended Posts

Hi, not sure why this is happening...

In "mando_airsupportdlg.sqf" I am trying to load out the CH47 (during ammo supply drops) with a full crew, but when I call for an ammo drop there is only a pilot aboard, here is my code....

           _driver = _group createUnit [_utype,[0,0,30], [], 0, "FORM"];
           _driver setskill 1.0;
           _driver setCombatMode "BLUE";
           _driver setBehaviour "CARELESS";
           _driver setRank "CORPORAL";
           _group selectLeader _driver;
           _driver moveInDriver _plane;

    _rampgunner = (group driver _plane) createUnit ["USMC_Soldier_Pilot",[0,0,30], [], 0, "FORM"];
    _rampgunner setRank "Private";
  	    _rampgunner setskill 1.0;
  	    _rampgunner moveInGunner _plane;

    _copilot = (group driver _plane) createUnit ["USMC_Soldier_Pilot",[0,0,30], [], 0, "FORM"];
           _copilot setRank "Private";
    _copilot setskill 1.0;
    _copilot moveInCargo [_plane, 0];

    _rightgunner = (group driver _plane) createUnit ["USMC_Soldier_Pilot",[0,0,30], [], 0, "FORM"];
    _rightgunner setskill 1.0;
    _rightgunner moveInTurret [_plane, [1]];

    _leftgunner = (group driver _plane) createUnit ["USMC_Soldier_Pilot",[0,0,30], [], 0, "FORM"];
    _leftgunner setskill 1.0;
    _leftgunner moveInTurret [_plane, [0]];

Why, oh why, isn't this working?

-AD

ADuke, do not edit the mando_airsupportdlg.sqf, edit the myconsole.sqf by adding the crew parameters to mando_airsupport_code_am

I'm not at home right now, but I can give you more details how I call these with several different choppers, fully loaded with crew.

Oh, and by the way, I like to use the choppers from your Helo pack in the Air Support Console. :D

Edited by panther42

Share this post


Link to post
Share on other sites
Nah, I can confirm that Javelins are not working with Arma2 CO and MMA. Locking procedure/firing mode selection works OK, but after firing the missiles fly through the tanks.

That's odd. I'm running MMA, MMA_XEH, CBA, ACE, ACEX, and a mashup soundmod among other things. I dropped down 2 fuel and ammo-less enemy tanks and 1 moving enemy tank on Utes. I tested the Jav, Metis and others all with successful kills. The Dragon just took like 4-5 shots before the crew bailed, but other than that--I've had no issues with ghost rounds going through tanks. That's really strange. O_O :confused:

Share this post


Link to post
Share on other sites

Edit the myconsole.sqf by adding the crew parameters to mando_airsupport_code_am

I ended up going this route late last night, it works so far but.....

In a previous version of MMA, I had it working to where an ammo supply HELO or a vehicle supply helo, with gunners aboard, would freely fire on any targets in their immediate vicinity, yet the pilot would not be distracted from the task at hand (eg; delivering ammo or vehicles).

Now it seems if I set the gunner's combatmode to anything but BLUE, the driver freaks out and ignores what he was sent there to do.

I like to use the choppers from your Helo pack in the Air Support Console.

Thanks for that, glad you are enjoying them. ;)

-AD

Share this post


Link to post
Share on other sites

Now it seems if I set the gunner's combatmode to anything but BLUE, the driver freaks out and ignores what he was sent there to do.

Could this be because of the setSkill and setRank options? I changed mine to Captain for _driver, with a setSkill of .7. Set my _copilot to Lieutenant, with a setSkill of .6. Set _crewchief to sergeant, with setSkill of .5, and _doorgunner to corporal, with setSkill of .4; I will test tonight to see if my pilot delivers the "goods" without distraction.

Also, I noticed your setSkill is all with lower case "s" in skill. Shouldn't this be with and upper case "S"?

Share this post


Link to post
Share on other sites

Could this be because of the setSkill and setRank options?

It's possible, although I am leaning more toward the combatmode of the gunners affecting the combatmode of the pilot.

Also, I noticed your setSkill is all with lower case "s" in skill. Shouldn't this be with and upper case "S"?

It probably should be for continuity's sake, but as far as the functioning of the actual command, don't think it matters.

I noticed several errors in the code that I posted, those have since been corrected.

As long as we are talking about changes to the MMA console, here are some things that I would like to do....

Delete the LGB plane after the laserTarget is destroyed...

Usually it hangs around flying overhead, not doing anything for the duration of the mission. When you are destroying several laserTargets in a mission, this makes for a whole lot of planes flying around hogging resources.

When an evac mission is started.....

Create an invisible H at _targetpos and at the destination...

Usually the evac helo picks the worst possible spot to land

To elaborate on the deleting of the LGB plane, it looks as though an attempt is made in the code to delete the plane after attacking...

_wp = _group addWaypoint [_targetpos, 0];

[_group, 1] showWaypoint "NEVER";

[_group, 1] setWaypointSpeed "LIMITED";

[_group, 1] setWaypointType "MOVE";

_wp = _group addWaypoint [[(_targetpos select 0)+sin(mando_ingress_dir)*4000,(_targetpos select 1)+cos(mando_ingress_dir)*4000], 0];

[_group, 2] showWaypoint "NEVER";

[_group, 2] setWaypointSpeed "LIMITED";

[_group, 2] setWaypointType "MOVE";

Sleep 4;

waitUntil {((unitReady leader _group) && (alive leader _group)) || (!alive leader _group)};

Sleep 4;

waitUntil {((unitReady leader _group) && (alive leader _group)) || (!alive leader _group)};

{

if (alive vehicle _x) then

{

deleteVehicle vehicle _x;

};

} forEach units _group;

{

if (alive _x) then

{

deleteVehicle _x;

};

} forEach units _group;

deleteGroup _group;

};

};

};

However this does not seem to be working in-game.

Edited by ADuke

Share this post


Link to post
Share on other sites
That's odd. I'm running MMA, MMA_XEH, CBA, ACE, ACEX, and a mashup soundmod among other things. I dropped down 2 fuel and ammo-less enemy tanks and 1 moving enemy tank on Utes. I tested the Jav, Metis and others all with successful kills. The Dragon just took like 4-5 shots before the crew bailed, but other than that--I've had no issues with ghost rounds going through tanks. That's really strange. O_O :confused:

Are you playing with the latest OA-beta? Yesterday evening I tried it again in BAF Tank Hunters scenario. Switched to Jav, Dir-mode, good lock on tank, fire. The missile went through the tank, bounced from the ground behind it and exploded.

Ofc, it may very well be that the problem is caused by ACE, CBA or OA-beta or something else. :) Didn't have time to try it just with vanilla CO and MMA. It's just it has worked with other mods before so I wondered if the problem is with MMA.

Share this post


Link to post
Share on other sites

Gents, Kallisto confirmed that the problem of missiles passing through tanks is caused with the last beta patch (which is already alarming enough), this problem doesnt happen with the official patch.

Share this post


Link to post
Share on other sites
Cheers Mandoble for the info. Hopefully it gets fixed soon!

It's not going to get fixed if BIS doesn't know about it. Provide a repro in the beta thread so they know how it gets caused.

Share this post


Link to post
Share on other sites
It's not going to get fixed if BIS doesn't know about it. Provide a repro in the beta thread so they know how it gets caused.

Mandoble posted about it in beta thread already... and if you read my post again, I said, I noticed it in official BAF mission (Tank Hunters). You would think they have a pretty damn quick access to their own missions, now wouldn't they? :D

Share this post


Link to post
Share on other sites
Mandoble posted about it in beta thread already... and if you read my post again, I said, I noticed it in official BAF mission (Tank Hunters). You would think they have a pretty damn quick access to their own missions, now wouldn't they? :D

Yes, but the issue doesn't affect regular gameplay, it affects Mando, which I doubt they test their betas with.

Share this post


Link to post
Share on other sites

"Sadly" I'm on vacation and my A2 is nowhere nearby, so I cannot provide any "repro". First I would like some more peoble using that beta patch as well as official one to reconfirm that the problem happens only with the latest beta. If confirmed, that means that createVehicled missiles are hardmless, as what MMA does for direct impact missile is to provide a warhead that just generate smoke/fire effects and scoring, the damage is that of the normal impact of the created missile with the target.

To create a repro independent of MMA might be easy:

_target = tank1;  // Target
_distance = 200;  // Initial distance between missile and target
_mis_spd = 100;  // Missile speed in m/s

_dir = getDir _target;
_pos = [(getPos _target select 0)+sin(_dir)*_distance, (getPos _target select 1)+cos(_dir)*_distance, 1.5);
_dir = _dir + 180;
_jav = "M_Javelin_AT" createVehicle [1000,1000,1000];
_jav setPos _pos;
_jav setDir _dir;
while {alive _jav} do
{
  _jav setVelocity [sin(_dir)*_mis_spd, cos(_dir)*_mis_spd, 0];
  _jav setDir _dir;
  Sleep 0.002;
};

Place a tank named tank1 in the map, the script should create a javelin 200m ahead of it and heading for it. If the terrain is flat enough the missile will hit the tank (or cross through it).

Share this post


Link to post
Share on other sites

I have a question about the way Mando works.

Why couldn't a fired eventHandler just grab whatever projectile was fired and then guide it rather than having to delete the BIS created one then create your own.

I've always wondered why it was done this way (engine limitation, etc?)

Share this post


Link to post
Share on other sites
I have a question about the way Mando works.

Why couldn't a fired eventHandler just grab whatever projectile was fired and then guide it rather than having to delete the BIS created one then create your own.

I've always wondered why it was done this way (engine limitation, etc?)

Some missiles cannot be properly controlled due to their settings in the config (e.g engine-based guidance interfeirs).

Mando missiles is also available as a script-only suite, so the only way to get around this is to spawn another, fully controllable missile, I reckon.

Share this post


Link to post
Share on other sites
Some missiles cannot be properly controlled due to their settings in the config (e.g engine-based guidance interfeirs).

Mando missiles is also available as a script-only suite, so the only way to get around this is to spawn another, fully controllable missile, I reckon.

I see, that makes sense.

Now I have another question sort related to that. These createVehicle missiles technically have no "owner" because they weren't technically fired from any vehicle, they were just created.

Is there a way I could use setVariable on the new missile to assign it an "owner". Example: _jav setVariable ["Owner","GossamerSolid",true];?

Or does setVariable not work for missiles/projectiles?

Share this post


Link to post
Share on other sites

There are two problems, one is already pointed out by Sickboy, the other is locality. If the missile is not local, it becomes quite complex (too late for the acceleration and speeds of the missile) to catch it in time and guide it. All the firing parameters should be passed from the client of the MMA firer, to the client of the missile owner and executed there. So it is always better to make sure the missile you fire (or order to fire) is local to you. BTW, a setLocal command with global effects would be quite handy ;)

Anyway, this would not explain why createVehicle missiles doesnt collide with vehicles with this latest beta patch (in case it is confirmed).

Share this post


Link to post
Share on other sites

setLocal could be interesting indeed :) Engine at least does it when a player disconnects, so doesn't sound too complicated either. CIT ticket perhaps?

I didn't know there are many situations where the fired missile isn't local to the firer btw.

@Gossamer: Yes you can setVariable them, but you can't account it to anyone in the official scoreboard, that's one of the nasty limitations - perhaps done to prevent cheats/hacks that would account (team)kills to other players? :P

This is why often the original missile is moved somewhere high in the sky, to then setPos the missile to the target just before/at impact.

Edited by Sickboy

Share this post


Link to post
Share on other sites
@Gossamer: Yes you can setVariable them, but you can't account it to anyone in the official scoreboard, that's one of the nasty limitations - perhaps done to prevent cheats/hacks that would account (team)kills to other players? :P

This is why often the original missile is spawned somewhere high in the sky, to then setPos the missile to the target just before/at impact.

I don't need to account for the stuff on the official scoreboard, luckily that doesn't bother me that much.

It's mainly for my teamkill prevention, mando related weapons bypass it due to there being no "owner" and no "side", I can rectify that by using setVariable.

Thanks!

Share this post


Link to post
Share on other sites

Well, mando missiles already have owner and based on it the mma score is calculated and assigned to the crew members of the firing vehicle in case they destroy something. It was not possible to assign variables to shells, bullets, missiles so that owner is kept by mando missile script controlling the missile and passed to the detonation script which calculates both, MMA score as well as BI score. BI score has two problems, you cannot assign kills by scripting command and you cannot score intercepted enemy missiles. But with BI score it is also calculated the rating, so if you kill friendlies your rating goes down and down, until you become renegade, this is also done by mma score function.

EDIT: You can also override the mma scoring function on-the-fly, so you can change all the criteria to assign score, rating and mma kills.

Edited by Mandoble

Share this post


Link to post
Share on other sites

Would anyone be interested in starting a new thread to share MMA Air Support Console setups? What works for you, what you find really adds to the in-game experience by using the console.

This thread is getting extremely long, and there are good bits and pieces which are missed when not using the "correct" search terms.

I myself, have a goal to read every page of this thread, of which I'm happy to announce I'm up to page 219...:yay:

This might eliminate alot of questions being asked of Mando 20 times or more for the same thing. Well, then again, maybe not...:D

I know one such thread was started for DAC, and is a good resource.

Any input would be appreciated.

Share this post


Link to post
Share on other sites

panther42, that's a pretty good idea, and might be not only limited to the air support console, but also for other setups as systems for players or automatic (SAMs, cruise missiles, etc) that you can simply copy/paste into your mission.

Share this post


Link to post
Share on other sites
Well, mando missiles already have owner and based on it the mma score is calculated and assigned to the crew members of the firing vehicle in case they destroy something. It was not possible to assign variables to shells, bullets, missiles so that owner is kept by mando missile script controlling the missile and passed to the detonation script which calculates both, MMA score as well as BI score. BI score has two problems, you cannot assign kills by scripting command and you cannot score intercepted enemy missiles. But with BI score it is also calculated the rating, so if you kill friendlies your rating goes down and down, until you become renegade, this is also done by mma score function.

EDIT: You can also override the mma scoring function on-the-fly, so you can change all the criteria to assign score, rating and mma kills.

I realize you've already made gains to rectify this issue, but the way I need to use it leaves me with issues. I'm going to have to test before I make anything solid, but from the point of view I'm looking at, the setVariable method should work great.

Share this post


Link to post
Share on other sites
Nah, I can confirm that Javelins are not working with Arma2 CO and MMA. Locking procedure/firing mode selection works OK, but after firing the missiles fly through the tanks.

yes, i can cofirm this... javelin does not work, use ArmA2 CO.

A.I shoots usually, but not the player.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×