Jump to content
Sign in to follow this  
mandoble

Mando Bombs and Mando Air Support Console

Recommended Posts

sahakaka has more problems the dawn of the yomie scripts doesn't work either on that island

and the mando bomb console doesn't work either no bombs are being created and with me the fighters fly all the way up in space.

Share this post


Link to post
Share on other sites

i´ve tried the console - doesn´t work...

version 1.2

like i said, the plane can drop bombs on streets, but only on streets biggrin_o.gif

it seems like it works if you´re far away from the target.

really strange...

would be awesome if you could tell me how to fix this!

greetings, XquZ.

Share this post


Link to post
Share on other sites

Sorry, I have no idea what might happen with Sahakaka. But just for curiosity, which is the ASL height of that island?

Place player where you might want to bomb and add

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format["ASL:%1 - AGL:%2", getPosASL this select 2, getPos this select 2] to its init field and post here the numbers.

Share this post


Link to post
Share on other sites

I registred to the forums here just for the mando bomb problem on sakakah.

I made a sakakah mission with a few scripts for artillerie, airstrike and chopper support, all scripts work there except the bomb script.

I was playing around with the script and tried to change parameters for the bomb runs, but the planes always fly to high and they drop bombs in just 20-30% of all fire missions.

If you call just 1 plane it doesnt drop bombs. More planes MAYBE drop bombs. In cause of the much to high alt, the bombs dont hit correct. You need to aim about 50-100m in front of the target.

(maybe the hight isnt correct in the map at all (its a beta), so the script got wrong coords for sakakah)

p.s i love all your scripts, awesome work and it really works perfect!

but i think sakakah needs some specific fixing of the bomb script, because something in the map wont work with it.

Share this post


Link to post
Share on other sites

I got a other problem too:

I´m on a coop mission and i want air support in it, but only 1 or 2 players should have the ability to call in the airstrikes.

But its a realistic mission, so there will be no respawn in it. The problem is now, if the guy got killed there will be no airstrikes at the rest of the mission.

Suggestion:

maybe add a laptop which need 2 mag slots like a satchel for activate the console instead give it to the player menue.

this would add a bit more realism to it. and there is no need to make a specific class, object or radio message for airstrike support.

The mapper can put as many of them in the mission as he want persons which are able to call in planes. And if one die the laptop can be secured by the team to have contact to their planes in the air.

just my 2 cents

If you want i could give you a playable editor version (alpha). There you will see the sakakah bomb drop bug on it, and my problem with the console. I went around the problem by ading it to vehicles, but its not a beautiful way around.

sry for my english

Share this post


Link to post
Share on other sites

Pain, you should use any of the standard methods to add actions after player is dead. Obviously this is up to the mission designer to implement and should never be inside the script. You might want to get the action back after respawn, another designer dont, etc.

This is just a quite basic way:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

while {true} do

{

add action here

waitUntil {!alive player};

waitUntil {alive player};

};

Now about sakakah problem. I think now I know where the problem is, expect an updated version shortly.

Share this post


Link to post
Share on other sites

Thanks for the fast bugfix!

Maybe i find a way to add the function to an object in the weapon box, there is no way for me to add to players because there is and will be no respawn.

After death i need a way to give the console to a other player which is alive. I need to add something for inventory that a teammate can rescue  from dead persons in the field without give too much person the control of such powerful and limited resources at the same time.

In other words i need your console not as simple function, i need it as an object which you can have in the inventory. And i have no idea (till now) how i could manage this...

Share this post


Link to post
Share on other sites

Easy, give the player with the console a laser designator. Then, for each player, check not for alive condition but for the presence of the LD:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// For each player, run inside your init.sqf

[]spawn

{

waitUntil {"Laserdesignator" in weapons player};

_acidx = player addAction blah blah blah;

waitUntil {!("Laserdesignator" in weapons player)};

player removeAction _acidx;

};

Share this post


Link to post
Share on other sites

I love you!  inlove.gif

thx

hope i can finish my mission now, cant wait till all work on sakakah.

Share this post


Link to post
Share on other sites
Easy, give the player with the console a laser designator. Then, for each player, check not for alive condition but for the presence of the LD:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// For each player, run inside your init.sqf

[]spawn

{

  waitUntil {"Laserdesignator" in weapons player};

  _acidx = player addAction blah blah blah;

  waitUntil {!("Laserdesignator" in weapons player)};

  player removeAction _acidx;

};

This wont work and i found a 2nd problem. if i add the console to a player and he get in a vehicle so the console command disappears and will not shown again.

So this method by adding it to a player after search for a present piece of gear in the inventory wont work too.

I really need the console added in a piece of equipment like a laptop or the laser designator (placeholder).

If i use the designator/laptop or whatever the console pops up OR if i have it in my inventory there should be a PERMANENT option in the sidemenue, as long as i have the item, which not disappears after getting in a vehicle or something.

Sry about that but im really bad in such coding things. I mean i could change a few parameters or get downloaded scripts in my missions, but i dont know much about itself.

My init sqs includes the start of your bomb script, the heli route and 1-2 other things. I couldnt get it working  confused_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

mando_support_left_WEST = 8;

mando_airsupport_type = "AV8B2";

mando_airsupport_range = 3500;

mando_airsupport_bomb_alt = 150;

//s3 addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

//s3 AddAction ["Radio: Artillerie","westari\setfire.sqs"];  

// For each player, run inside your init.sqf

[]spawn

{

waitUntil {"Laserdesignator" in weapons player};

_acidx = player addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

waitUntil {!("Laserdesignator" in weapons player)};

player removeAction _acidx;

};

//titleText["text", "PLAIN DOWN"];

_scr = [heli1,[getPos dest1],50, true]execVM"mando_heliroute_arma.sqf";

Sleep 1;

waitUntil {heli1 getVariable "mando_heliroute" != "busy"};

{_x assignAsCargo heli1} forEach units group soldier1;

units group soldier1 orderGetIn true;

waitUntil {{_x in heli1} count units group soldier1 == count units group soldier1};

//titleText["We'll bring them to Vallejos's hotel", "PLAIN DOWN"];

_scr = [heli1,[getPos dest2],50, true]execVM"mando_heliroute_arma.sqf";

Sleep 2;

waitUntil {heli1 getVariable "mando_heliroute" != "busy"};

{_x action ["GETOUT", heli1];unassignVehicle _x} forEach units group soldier1;

Sleep 4;.................................and so on

Thats my init but it causes errors and if i add it manualy to a player the console get lost after get in a vehicle...

(the disabled s3 lines were to add in a named soldier/vehicle)

Try to place a empty vehicle in your mando console test mission, get in drive a bit and get out. Then call in the planes.... See it?

The console should be a piece of equipment for inventory to activate not just a added command in the sidemenue of the player or a vehicle which get lost after driving around.

Share this post


Link to post
Share on other sites

This way you keep your action also inside vehicles.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// Add to your init.sqf

[] spawn

{

private["_acidx1", "_acidx2", "_unit", "_veh"];

_acidx1 = -1;

_acidx2 = -1;

while {true} do

{

waitUntil {("Laserdesignator" in weapons player) && (alive player)};

_acidx1 = player addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

while {("Laserdesignator" in weapons player) && (alive player)} do

{

_unit = player;

if (vehicle _unit != _unit) then

{

_veh = vehicle _unit;

_acidx2 = vehicle _unit addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

waitUntil {(vehicle _unit == _unit) || (!alive _unit)};

_veh removeAction _acidx2;

};

Sleep 1;

};

_unit removeAction _acidx1;

};

};

Share this post


Link to post
Share on other sites

While testing the console from inside vehicles I found a problem, when you click on the console's map (and if the vehicle driver is in your group), the map will automatically commands the driver to move there where you clicked, which is exactly where the planes will drop their bombs.

Now I have no idea how to configure the map control so that it doesnt send automatically any move commands to the driver. I will delay the release of the new version compatible with sakakah until I figure out how to solve the map control problem.

Share this post


Link to post
Share on other sites

so you´ve allready fixed the sakakah problem?

very nice, i knew we can count on you wink_o.gif

Share this post


Link to post
Share on other sites

I got all working now, i only need to put 1 line more in it and now it works great! Now only the person who got the designator is able to open the console. And it works all time in vehicles and after got out of it.

Now i just need working planes on sakakah, hope you fix the waypoint problem soon, but i would dont care about it for my mp coop mission. I dont have team AI in it.

Thanks for your help  notworthy.gif

Here is the working code again:

Maybe you put it in your console demo mission or a readme, to give ppl this alternate option to use the air support console:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[] spawn

{

 private["_acidx1", "_acidx2", "_unit", "_veh"];

 _acidx1 = -1;

 _acidx2 = -1;

 while {true} do

 {

    waitUntil {("Laserdesignator" in weapons player) && (alive player)};

    _acidx1 = player addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

    while {("Laserdesignator" in weapons player) && (alive player)} do

    {

       _unit = player;

       if (vehicle _unit != _unit) then

       {

          _veh = vehicle _unit;

          _acidx2 = vehicle _unit addAction ["Console: Air support", "mando_airsupportdlg.sqf"];                  

          waitUntil {(vehicle _unit == _unit) || (!alive _unit)};

          _veh removeAction _acidx2;

    _acidx1 = player addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

       };

       Sleep 1;

    };

    _unit removeAction _acidx1;

 };

};

(the new line will safe console after get out vehicle)

Share this post


Link to post
Share on other sites

Your new line is not needed, as the action is still in the player's unit. The "unit" (player) doesnt lose its actions when he is inside a vehicle, when he gets out, his actions are available again. IF you add the action again, the player will end with multiple actions available.

Share this post


Link to post
Share on other sites

tested it, before i lost the ability to call console after get out car. There i need to drop designator and get up again to have the option for the console again.

with the new line it works perfect after get out car at my test.

I have very poor scripting knowledge and after my test

i just copied your line which add the console after get out the car in your script. Finaly that works after testing for me.

As soon as the bomb works i will make a playable version of my mission. I think its really awesome now thanks you and some of your scripts.

yay.gif

p.s. i tested my mission in the editor only maybe youre right if i test with mates in mp. i will do that asap and give you a report.

Share this post


Link to post
Share on other sites

This is quite weird, I've tested it too and works fine without the extra addAction getting in a car, getting out the car, getting in again, etc. Do you have something running at the same time removing actions?

Share this post


Link to post
Share on other sites

Youre right, im wrong

But without the line i lost console after get out vehicle. and with the line it add lines after even ride

banghead.gif  so still have problem banghead.gif

p.s. i use 6th sense mod, sakakah and wp insurgents. so maybe that cause the error that delete added commands after get out a vehicle

is this working after get out vehicle?:

_unit removeAction _acidx1;

_acidx1 = player addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

huh.gif?huh.gif

edit: it works for me now with all mods and no line will be added. (never tested it without the mods!! im sure youre right but i really got this error. dont know what delete the added commands...Finaly i found a way around the bug in one of those mods)

but i know thats not a error from me in my mission. i can add a empty car in your demo mission and then get in/out and the message is gone too. must be in a mod (3gb mods at all started with arma)

i hope this are the last questions out of topic now:

Is my wayaround now working for all too, or does it cause new bugs? what you think?

Thanks for your patience!

Sry for my english but im german wink_o.gif

Share this post


Link to post
Share on other sites
Is my wayaround now working for all too, or does it cause new bugs? what you think?

All I can say about is that the code I posted above works fine in any situation I tested with vehicles (no mods, vanilla ArmA 1.08). Even starting inside the vehicle. So, that code is safe and valid for anyone. But if there is something else in your game removing player actions when player gets out of vehicles, there is nothing I can do.

_unit removeAction _acidx1;

_acidx1 = player addAction ["Console: Air support", "mando_airsupportdlg.sqf"];

This is "dangerous" in your case, because it seems clear that action _acidx1 has been already removed by something else. If that "something else" also added a new action after removing the console one, this new action will have the same idx number as the removed console action and your removeAction will remove the "wrong" action.

EDIT: Over all, as said before, adding and removing actions, how and when is up to the mission designers. If your workaroud works for you, fine, but make sure this works also for other players using at least the minimum set of addons required by your mission.

Share this post


Link to post
Share on other sites

Lets hope it works mate. I did a little research and found this thread here (post by karillion 2 before my post):

<<<<BI Forum Thread>>>>

Seems a few more got the problem too....

But thanks for your help here. i got it work now, and i remove those 2 lines after i found the problem.

Now i cant wait for the fixed bombs   welcome.gif  

Do you release the new fix here? or do i need check other sides for?

edit: seems is has to do with the spawn... maybe i get a answer there whats the problem.

I wish i could code like you  crazy_o.gif  then i would have much much less problems.

Share this post


Link to post
Share on other sites

Would be LOVELY for skilled people to post any missions with Mandoble's great scripts. *hint*

[TAO] Kremator

PS too thick to do it myself !

Share this post


Link to post
Share on other sites

The mission will be avaiable as soon as mando released his sakakah map fix.

I will post the mission in the missions section then asap.

Share this post


Link to post
Share on other sites

Further to my last post, I have now been drawn into scripting mission due to Mandoble's AMAZING work !

[TAO] Kremator

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  

×