seedo81 10 Posted January 23, 2010 Does any one can help about how i can lift tanks using copters/ thank you Share this post Link to post Share on other sites
manzilla 1 Posted January 24, 2010 Does any one can help about how i can lift tanks using copters/thank you Check this new script pack, it does it. Easy to implement. Look at the features. http://forums.bistudio.com/showthread.php?t=94280 Share this post Link to post Share on other sites
seedo81 10 Posted January 24, 2010 Thank u man but i want just the helicopter lift thingy only, how? Share this post Link to post Share on other sites
Murklor 10 Posted January 24, 2010 A while ago I made a really, really simple script for lifting vehicles, just to try out the attachto function. Its never really been used, but if I remember correctly it does work. Feel free to rip parts out of it: In init: this addAction["Attach/Detach","script.sqf",[]] _helo = _this select 0; _player = _this select 1; _id = _this select 2; _args = _this select 3; if (_player != (driver _helo)) exitWith { hint "You're not the pilot!"; }; if ( (getPos _helo) select 2 <= 3 OR (getPos _helo) select 2 >= 8) exitWith { hint "You're either too high or too low to attach or detach a vehicle"; }; _nearestObjects = nearestObjects [_helo, ["LandVehicle","Air"],10]; if (count _nearestObjects >=2) then { _liftVehicle = _nearestObjects select 1; _attached = _helo getVariable "vehicle_attached"; if (_attached) then { detach _liftVehicle; hint format ["detaching %1",(_helo getVariable "vehicle_attached")]; _liftVehicle setVelocity [0,0,0]; _helo setVariable ["vehicle_attached",false,false]; } else { _helo setVariable ["vehicle_attached",true,false]; _liftVehicle engineOn false; _liftVehicle attachTo [_helo, [0,0,-2.5]]; hint format ["lifting %1",_liftVehicle]; }; }; Share this post Link to post Share on other sites
eggbeast 3685 Posted January 24, 2010 you want mando hitch http://forums.bistudio.com/showthread.php?t=77819&highlight=mando+hitch Share this post Link to post Share on other sites
seedo81 10 Posted January 24, 2010 i made R3F works but i dont want the artillery thing to work i just wont the Airlift feature only, is that possible? Share this post Link to post Share on other sites
manzilla 1 Posted January 24, 2010 i made R3F works but i dont want the artillery thing to work i just wont the Airlift feature only, is that possible? Ask him in his forum. Share this post Link to post Share on other sites
Holyman 0 Posted January 27, 2010 Just wanted to say Murklor: Your script works brilliantly, exactly what I've been after for a while. Just one note though... In order to get it to work, I had to add... this setVariable ["vehicle_attached",false,false]; ...to the "Init" line of the helicopter in question (along with the addAction...), in order to get it to work. Otherwise, the If...Then...Else loop didn't seem to fire. Other than that, thanks very much, you're a star! Peace Share this post Link to post Share on other sites
rrpatch 10 Posted September 27, 2010 I have used the attachto script and it works great. But is there a way to have everything in the script and just call the script.sqf ? Right now I add these 2 lines in the init field of the chopper. this setVariable ["vehicle_attached",false,false]; and this addAction["Attach/Detach","script.sqf",[]] Is there a way to add the addaction and setVariable lines to the script its self and then only have ( nul = [this,30] execVM ""script.sqf"""; to call the script? Hard to understand because they called the script - script.sqf Please let me know if I need to explain more clear. If some one can do it please post fixed code and rename the script. LOL Thank you. Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted September 28, 2010 Murklor, is there a way to have the hint say "Vehicle Released", instead of "detached true"? I renamed the "script.sqf" to be called "heli_lift.sqf" and referred the add action to use the new script file name. As Holyman suggested, I also added... this setVariable ["vehicle_attached",false,false]; and I removed the ability to lift other "Air" vehicles. However, I would like to be able to lift an ammo crate if possible. Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted September 29, 2010 When I removed ,"Air" from the line: _nearestObjects = nearestObjects [_helo, ["LandVehicle","Air"],10]; ... it then would not allow me to release the vehicle at all. Here's my problem. I don't want player being able to airlift another chopper. I also don't want them to be able to lift any of the tripod guns, because when they release the tripod gun, the gun is then left hovering in the air. I just want it so the cars and tanks can be lifted and released. I decided against lifting ammo crates unless I can set it so they can only lift 1 specific ammo crate. I don't want them lifting the main ammo crate at base, but maybe let them lift a different ammo crate near the chopper helipad wouldn't be a bad idea. Anyway, how can I change the script so the pilot can only lift tanks and cars? Share this post Link to post Share on other sites