Jump to content
Sign in to follow this  
Gunnykat

Air lifting no AI

Recommended Posts

I have look in 3 forums. For the unbuged version of this. Or one that does not use an add on. I know Domination One Team AI West uses this but he has alot of stuff going on in his scripting to see what i need to get this working. Is there anyone that has a working script of this that is not buged and works well. I would build it but I have no clue what all is needed. and everyone that posts about it send you to outdated, non working or addon suported versions. I have been looking all day. I have googled and ooked in forums. I sure wish this forum had a search as well. alot of info here but hell to search for it. I swear I am not mad. Just wore out looking for a simple script so I hear lol. Thanks

Share this post


Link to post
Share on other sites

See above on the tool bar between New posts and quick links. Marked Search.

ah good you've found it

I'm not sure I understand what your looking for, if you gave a clearer description of what you want to achieve in your mission it would be better. Do you mean a chopper with an AI pilot to fly in playable units to a support position or positions behind the front line and then return to the base spawn or respawn at the base so as to pick up more players and ferry them to the front?

There's loads of stuff on choppers in this forum. I was looking at this script by kylania the other day and thinking of having a play with it

http://forums.bistudio.com/showthread.php?t=85308 maybe it could be modified for the purpose

Share this post


Link to post
Share on other sites

What I am looking for. Is the script to load lift a vehicle useing a Sea Hawk. Xeno made one but his maps are total script and man i can't tell how he does anything. Any ways in his Domination map you can hover over a tank for instance. And get a command when you scroll down to pick it up using an invisable tow hook. and then you can fly it to where ever you need to take it and then have an option to drop it. It sounds simple but I have no clue where to begin to make this.

Edited by Gunnykat

Share this post


Link to post
Share on other sites

I don't know enough about Air lifts to help you on this one, why not PM Xeno about his scripts and ask him if could help you? Tajin talks a bit about it here http://forums.bistudio.com/showthread.php?t=73630&page=6 to be honest though could an actual Sea Hawk lift a battle tank in the real world? Or even a Chinook for that matter? I guess one of these lads will come up with a script for it at some stage.:)

For myself I use a Chinook to bring in a Hummvee for example, which is inside the choppers cargo space, by adding an action to the Chinook. It hovers, you open the ramp, jump in the chopper, into the hummvee, back it down the ramp and away you go. Chopper flies off. You could put a fire team in the chopper to if you want they all jump in the jeep and drive out the chopper when it lands.

Share this post


Link to post
Share on other sites

Cool thanks for the link you must had posted befor i seen it. I think this is way advance for me could someone plese build a script for me. and please explain whats going on. I hate being in the fog. Actualy its a cave with a match that is just starting to fizzel out hehe.

Edited by Gunnykat

Share this post


Link to post
Share on other sites

Ok if i can under stand what this is I might make it work. Is _vcl the same as _vehicles. And what is _c. I also need to know what _this is as well.

Edited by Gunnykat

Share this post


Link to post
Share on other sites

Those are "local variable names".

_vcl probably means "vehicle" and not sure what _c would be. Though it could be anything.

Share this post


Link to post
Share on other sites

Ahh ok. I guess i need to look that up. Wow I am still in the dark. Ok _ makes it local or privet but what exactly does that mean.

I am adding this script. I want to try and change it to alow me to hook up to the top. This is a tow script. I want to change it to a lift. Using a Sea Hawk. I have seen them lifting Artilary and such. Using tow straps. I want an efect like that on my UH 60. and it works like this I am sure just have to change the hook up position. And add how low it should hang from below the UH 60

// addTowAction.sqf

// © AUGUST 2009 - norrin (norrin@iinet.net.au)

_vcl = _this select 0;

_c = 0;

_load = _vcl addAction ["Tow aircraft", "c130Tow\attach.sqf", "", 0, false, true];

_unload = _vcl addAction ["Detach aircraft ", "c130Tow\dettach.sqf","", 0, false, true];

Norrn_C130Tow = false;

_plane = objNull;

_distance = 0;

_vcl removeAction _load;

_vcl removeAction _unload;

while {alive _vcl && count (crew _vcl) == 1} do

{

if (count (nearestObjects [_vcl, ["PLANE"], 20]) > 0 && _c == 0 && !Norrn_C130Tow) then

{

_plane = nearestObjects [_vcl, ["Plane"], 20] select 0;

_distance = switch (typeOf _plane) do {

case "A10": {9.5};

case "AV8B2": {9};

case "C130J": {17};

case "F35B": {9.2};

case "MV22": {12.5};

case "Su25_Ins": {9.2};

case "Su25_CDF": {9.2};

case "Su34": {12};

};

_pos = getPos _plane;

_dir = getDir _plane;

_posfront = [(_pos select 0) + (sin _dir * _distance), (_pos select 1) + (cos _dir * _distance), 0];

//hint format ["vcl: %1 \nplane: %2", (getPos _vcl), _posfront];

if (_vcl distance _posfront < 2.5 && (getDir _vcl) > (_dir - 20) && (getDir _vcl) < (_dir + 20)) then

{

_load = _vcl addAction ["Tow aircraft", "c130Tow\attach.sqf", [_vcl, _plane], 0, false, true];

_vcl removeAction _unload;

_c = 1;

};

};

if (Norrn_C130Tow && _c == 1) then

{

_unload = _vcl addAction ["Detach aircraft ", "c130Tow\detach.sqf", _plane, 0, false, true];

_vcl removeAction _load;

_c = 0;

};

if (count (nearestObjects [_vcl, ["PLANE"], 20]) > 0 && _c == 1 && !Norrn_C130Tow) then

{

_pos = getPos _plane;

_dir = getDir _plane;

_posfront = [(_pos select 0) + (sin _dir * _distance), (_pos select 1) + (cos _dir * _distance), 0];

//hint format ["car: %1 \nplane: %2", getDir _vcl, _dir];

if (_vcl distance _posfront > 2.5 || (getDir _vcl) > (_dir + 20) || (getDir _vcl) < (_dir - 20)) then

{

_vcl removeAction _load;

_c = 0;

};

};

if (count (nearestObjects [_vcl, ["PLANE"], 20]) == 0 && _c == 1) then

{

_vcl removeAction _load;

_vcl removeAction _unload;

_c = 0;

};

sleep 1;

};

_vcl removeAction _load;

_vcl removeAction _unload;

detach _plane;

if (!alive _vcl) exitWith {};

/////////////////////////////////////////////////////////////////////////////////////////////////////////// next script

// c130Tow_init.sqf

// © AUGUST 2009 - norrin (norrin@iinet.net.au)

// Based on an idea from David Campagna

_vcl = _this select 0;

_vcl addEventHandler ["GETIN",{if ((_this select 1) == "driver") then

{_nul = [_this select 0] execVM "c130Tow\addTowAction.sqf"}}];

if (true) exitWith {};

//////////////////////////////////////////////////////////////////////////////////////////////////////////////// next script

// attach.sqf

// © AUGUST 2009 - norrin (norrin@iinet.net.au)

_array = _this select 3;

_vcl = _array select 0;

_plane = _array select 1;

switch (typeOf _plane) do {

case "A10": {_plane attachto [_vcl,[0, -9, -0.2]];};

case "AV8B2": {_plane attachto [_vcl,[0, -8.5, 1.6]];};

case "C130J": {_plane attachto [_vcl,[0,-15.5,4.6]];};

case "F35B": {_plane attachto [_vcl,[0, -9, 1.1]];};

case "MV22": {_plane attachto [_vcl,[0, -12, 2.5]];};;

case "Su25_Ins": {_plane attachto [_vcl,[0, -9, 2]];};

case "Su25_CDF": {_plane attachto [_vcl,[0, -9, 2]];};

case "Su34": {_plane attachto [_vcl,[0, -14, 1.6]];};

};

Norrn_C130Tow = true;

if (true) exitWith {};

//////////////////////////////////////////////////////////////////////////////////////////// next script

// detach.sqf

// © AUGUST 2009 - norrin (norrin@iinet.net.au)

_plane = _this select 3;

detach _plane;

Norrn_C130Tow = false;

if (true) exitWith {};

Edited by Gunnykat

Share this post


Link to post
Share on other sites

In that case _c appears to be a variable that marks if something is connected or not I think?

What you're asking for isn't trivial (as in, changing a line or two of those scripts) or else someone would have done it already. :)

There's been a few attempts at this slingload concept using Norrin's FastRope, or attachTo or whatnot, but none very robust yet. Mando Hitch is still the best so far, even with a few porting errors.

Hopefully Mando will update his script for ArmA2 and we'll be happy again. :)

Share this post


Link to post
Share on other sites

There is a script in Domination Xeno uses but not sure how he does it. Here is a link where it can be down loaded.http://www.armaholic.com/page.php?id=6014&a=dl Its in any of the domination maps. I just cant figure out how he scripts it. You have to use PboView0.8 to open up pbo file. Part of the script is in the x_script folder. And you said mando hitch can do it but its set up for arma how would i set it up for arma 2. I think this is what Xeno uses.

Edited by Gunnykat

Share this post


Link to post
Share on other sites

Well guess this is how my post ends with a big fat 0. Well at least I gave this part of maping a shot. I also found out that custome sounds are a joke. works when you preview it . But when loaded on a server big fat no go. Behind Enemy lines has a nice bit of sound change. And it really nice makes you feel like you in a real squad. To bad sound add ons are striped when playing online. All I can say BI needs to fix stuff like that kills all the thing you can do with the game.

Share this post


Link to post
Share on other sites
All I can say BI needs to fix stuff like that kills all the thing you can do with the game.

No not bugs on BIS's part, but lack of knowledge on yours. You need to build up to learning the advanced scripting type things you're wanting to do. Everything you're asking about works, they are just for the most part too difficult to demonstrate in a simple forum post.

You've been directed to where to download Mando Hitch, and you already have Behind Enemy Lines. You've got the tools and resources in your possession, time to learn how they work and get them working for your own purposes. Just like nearly all of us have done in the past. :)

Share this post


Link to post
Share on other sites

Roger that. the thing is how do you get mando hitch sample to work. I get and error no desert. I know you have given me plenty to play with. And on the behind enemy lines thing. I can't understand why the sound files work on preview and when you load it up on a server it does not. I find it weard on that. I am sorry to have offened anyone. Its just that I can't get any example of this script separate. I know mando hitch is but I can not get it to work. I want to see what he does to triger the file but I can not look at mission must need an addon or its arma map.

---------- Post added at 02:43 AM ---------- Previous post was at 02:23 AM ----------

Ok I tried mando hitch again. I set it up just like he has it in the zip file. in my mission file under the map i want it on. added the into info and description info to what I have already in the mission. the error I get is Variabl 'mando_hitch_hud' does not suport serialization and should not be stored in the mission name space. I have no clue what this means.

Edited by Gunnykat

Share this post


Link to post
Share on other sites

Stuff like sound files and the likes seem to not work when you don't make the mission into a pbo (by exporting to multiplayer when saving) before putting it on a server.

Share this post


Link to post
Share on other sites

It is a pbo file when i put it on the server. I dl it cause alot of folks said it was a good mission. And had alot of sound editing. When i did not hear the sound bits on the server I got out my pbo viewer to see what all he did. And when i previewed it it all work. So thats what got me.

Share this post


Link to post
Share on other sites

The serialization error is a common error for ArmA ports. It still works. I think you can get rid of the error with this line at the top of your code, but I've never actually tried this:

disableSerialization;

Share this post


Link to post
Share on other sites

I did it. I took Norrin's C-130 load script and added a few changes and wola. Wooo hoo. Here is the script for all of you looking for a simple load lift without a hud. Thanks for all the help you all. I know I was a pain. But at least i got it done.

I use this on the sea hawk to activate script nul = [this,"car"] execVM "mountOnC130\mount_vcl_init.sqf";

// mount_vcl.sqf

// © JUNE 2009 - norrin (norrin@iinet.net.au)

_vcl = _this select 0;

_caller = _this select 1;

_typeOfVcl = _this select 3;

_dir = getdir _vcl;

_mountVcl = objNull;

_blogs = 0;

_c = 0;

if (count nearestObjects [player, [_typeOfVcl], 30] > 0) then

{

_mountVcl = nearestObjects [player, [_typeOfVcl], 30] select 0;

};

if (vehicle _caller != _caller) then {_caller action ["", vehicle _caller]; sleep 1};

if (!((_vcl getVariable "NORRN_mountOn_vcl_pos0") select 0)) then

{

_mountVcl attachTo [_vcl,[0,0,-8]];

sleep 0.1;

_vcl setVariable ["NORRN_mountOn_vcl_pos0", [true, _mountVcl], true];

};

if (true) exitWith {};

//////////////////////////////////////////////////////////////// next script

// mount_vcl_init.sqf

// © JUNE 2009 - norrin (norrin@iinet.net.au)

/*

Name playable units and vehicle in the editor

Put this in the init line of the vehicle in the editor: nul = [this] execVM "mountOnC130\mount_vcl_init.sqf";

*/

_vcl = _this select 0;

_typeOfVcl = _this select 1;

_c = 0;

_load = _vcl addAction ["Lift", "mountOnC130\mount_vcl.sqf", _typeOfVcl, 0, false, true];

_unload = _vcl addAction ["Drop", "mountOnC130\dismount_vcl.sqf","", 0, false, true];

_toAttach = objNull;

_vcl removeAction _load;

_vcl removeAction _unload;

if (isServer) then

{

_vcl setVariable ["NORRN_mountOn_vcl_pos0", [false, _toAttach], true];

sleep 2;

};

while {alive _vcl} do

{

if (!((_vcl getVariable "NORRN_mountOn_vcl_pos0") select 0) && _c == 0 && count (nearestObjects [_vcl, ["LandVehicle","Air"], 30]) > 0 && count (nearestObjects [_vcl, [_typeOfVcl], 30]) > 0) then

{

_load = _vcl addAction ["Lift", "mountOnC130\mount_vcl.sqf", _typeOfVcl, 0, false, true];

_vcl removeAction _unload;

_c = 1;

};

if (((_vcl getVariable "NORRN_mountOn_vcl_pos0") select 0) && _c == 1) then

{

_unload = _vcl addAction ["Drop", "mountOnC130\dismount_vcl.sqf","", 0, false, true];

_vcl removeAction _load;

_c = 0;

};

if (count (nearestObjects [_vcl, ["LandVehicle","Air"], 30]) == 0 || count (nearestObjects [_vcl, [_typeOfVcl], 30]) == 0) then

{

_vcl removeAction _load;

_vcl removeAction _unload;

if (!((_vcl getVariable "NORRN_mountOn_vcl_pos0") select 0)) then {_c = 0};

if ((_vcl getVariable "NORRN_mountOn_vcl_pos0") select 0) then {_c = 1};

};

//hint format ["%1", (_vcl getVariable "NORRN_mountOn_vcl_pos0")];

sleep 2;

};

if (!alive _vcl) exitWith {};

////////////////////////////////////////////////////////////////////// next script

// dismount_vcl.sqf

// © JUNE 2009 - norrin (norrin@iinet.net.au)

_vcl = _this select 0;

_caller = _this select 1;

_mountVcl = (_vcl getVariable "NORRN_mountOn_vcl_pos0") select 1;

_vclDir = getDir _vcl;

if (vehicle player == vehicle player ) then

{

detach _mountVcl;

_mountVcl setPos [(getPos _vcl select 0) - (15 * sin _vclDir), (getPos _vcl select 1) - (15 * cos _vclDir), 0];

_vcl setVariable ["NORRN_mountOn_vcl_pos0", [false, objNull], true];

};

if (true) exitWith {};

Edited by Gunnykat

Share this post


Link to post
Share on other sites

One small boo boo with this script. When I drop it on a lhd it goes to the bottom of the ocean. On land it does fine. Problem number 2 on drop it drops behind the helocopter when i hover. Any Ideas on how to fix this.

Share this post


Link to post
Share on other sites

The dropping behind is controlled by this line:

_mountVcl setPos [(getPos _vcl select 0) - (15 * sin _vclDir), (getPos _vcl select 1) - (15 * cos _vclDir), 0];

If you want it dropped below the helo, try this:

_mountVcl setPos [(getPos _vcl select 0), (getPos _vcl select 1), 0];

As for the LHD... umm.. I have no idea. You could probably put a game logic near there and have it look for whatever object you're dropping and auto move it up the 15.4m or whatever to get it on the deck? Or try dropping it from higher maybe? Actually, come to think of it, just do that. Test if you're near the LHD (via gamelogic or whatever) then change drop to 15.4 instead of 0.

Share this post


Link to post
Share on other sites

will do. Thanks for the info.:D Umm exactly what do i put in game logic. I have tried droping it by adding the height change. works good on LHD. But then it floats on land. hehe.

Edited by Gunnykat

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  

×