Jump to content
giallustio

=BTC= Logistic [A3] - BETA

Recommended Posts

Are you using the last version? If i remember right i changed it and now the cargo is released behind the vehicle

Share this post


Link to post
Share on other sites
Are you using the last version? If i remember right i changed it and now the cargo is released behind the vehicle

I think so. I am using Ver. 0.13 but it is alright now.

I think it may have been me mate :(

When I was trying to load the truck I had forgotten how to do it and clicked the "place" option. I did move it around a little wondering what it was for.

I backspaced out of that and eventually figured out the correct way to do it, loaded and unloaded it.

I think I upset the way you set it up and hence the bonfire.

I have just restarted the server and although it unloads on the right to the middle of the truck there are no flames.

Sorry for wasting your time bud :/

Share this post


Link to post
Share on other sites

@Giallustio - I am not sure if you are entertaining error reports for the 0.77 DEV build but I receive the following error whenever I load a box. Also, boxes that are loaded and dropped will not delete the dropped box upon reloading of the same previously dropped box.

http://i.imgur.com/Nk3EIB0.jpg (203 kB)

These errors are generated on a Dedicated server.

Share this post


Link to post
Share on other sites

Giallustio,

Awesome set of scripts just what we needed, no problems yet on Dedicated Server.

Will you update this to the latest Dev or wait for stable ?

Share this post


Link to post
Share on other sites

Please help me, a person uses fast rope at the ground and dies. May be too fast down? I do not know. :confused:

Share this post


Link to post
Share on other sites
Was the helo moving? Did the pilot cut the ropes?

Helicopter hovered. Pilot deploy ropes. Not cut ropes. But if the height of 8m - player not dies.

=BTC=_logistic_init.sqf

/*
Created by =BTC= Giallustio
Version: 0.13
Date: 20/03/2013
Visit us at: http://www.blacktemplars.altervista.org/
*/
if (isServer) then 
{
BTC_id_repo = 10;publicVariable "BTC_id_repo";
BTC_cargo_repo = "Land_HBarrierBig_F" createVehicle [- 5000,- 5000,0];publicVariable "BTC_cargo_repo";
};
if (isDedicated) exitwith {};
BTC_active_lift      = 1;
BTC_active_fast_rope = 1;
BTC_active_cargo     = 0;
//Common
BTC_dir_action = "=BTC=_logistic\=BTC=_addAction.sqf";
BTC_l_placement_area = 20;
if (BTC_active_lift == 1) then
{
//Lift
BTC_lift_pilot    = [];
BTC_lift          = 1;
BTC_lifted        = 0;
BTC_lift_min_h    = 7;
BTC_lift_max_h    = 12;
BTC_lift_radius   = 3;
BTC_def_hud       = 0;
BTC_def_pip       = 1;
BTC_l_def_veh_pip = ["B_Heli_Light_01_F","O_Heli_Light_02_F","B_Heli_Transport_01_F","I_Heli_Transport_02_F"];
BTC_l_pip_cond    = false;
BTC_cargo_lifted  = objNull;
BTC_Hud_Cond      = false;
BTC_HUD_x         = (SafeZoneW+2*SafeZoneX) - 0.155;//+ 0.045;
BTC_HUD_y         = (SafeZoneH+2*SafeZoneY) + 0.045;
_lift = [] execVM "=BTC=_logistic\=BTC=_lift\=BTC=_lift_init.sqf";
BTC_get_liftable_array =
{
	_chopper = _this select 0;
	_array   = [];
	switch (typeOf _chopper) do
	{
		//MH9
		case "B_Heli_Light_01_F"     : {_array = ["Motorcycle","ReammoBox","ReammoBox_F","Quadbike_01_base_F","Strategic"];};
		//PO-30
		case "O_Heli_Light_02_F"     : {_array = ["Motorcycle","ReammoBox","ReammoBox_F","Strategic","StaticWeapon","Car"];};
		//UH80
		case "B_Heli_Transport_01_F" : {_array = ["Motorcycle","ReammoBox","ReammoBox_F","Strategic","StaticWeapon","Car","Truck","Wheeled_APC","Air","Ship"];};
		//CH49
		case "I_Heli_Transport_02_F" : {_array = ["Motorcycle","ReammoBox","ReammoBox_F","Strategic","StaticWeapon","Car","Truck","Wheeled_APC","Tracked_APC","APC_Tracked_01_base_F","APC_Tracked_02_base_F","Air","Ship"];};

	};
	_array
};
};
if (BTC_active_fast_rope == 1) then
{
//Fast roping
BTC_fast_rope_h = 35;
BTC_fast_rope_h_min = 5;
BTC_roping_chopper = ["B_Heli_Light_01_F","O_Heli_Light_02_F","B_Heli_Transport_01_F","I_Heli_Transport_02_F"];
_rope = [] execVM "=BTC=_logistic\=BTC=_fast_roping\=BTC=_fast_roping_init.sqf";
};
if (BTC_active_cargo == 1) then
{
//Cargo System
_cargo = [] execVM "=BTC=_logistic\=BTC=_cargo_system\=BTC=_cargo_system_init.sqf";
BTC_def_vehicles     = ["Tank","Wheeled_APC","Truck","Car","Helicopter"];
BTC_def_cargo        = ["Motorcycle","ReammoBox","ReammoBox_F","Strategic"];
BTC_def_drag         = ["ReammoBox","ReammoBox_F","Strategic"];
BTC_def_placement    = ["ReammoBox","ReammoBox_F","Strategic"];
BTC_cargo_selected   = objNull;
BTC_def_cc =
[
	"B_Quadbike_01_F",2,
	//Trucks
	"B_Truck_01_transport_F",10,
	"B_Truck_01_covered_F",10,
	"I_Truck_02_covered_F",10,
	"O_Truck_02_covered_F",10,
	"I_Truck_02_transport_F",10,
	"O_Truck_02_transport_F",10,
	"O_Truck_02_transport_F",10
];
BTC_def_rc =
[
	"Land_BagBunker_Small_F",4
];
};
//Functions
BTC_l_paradrop =
{
_veh          = _this select 0;
_dropped      = _this select 1;
_chute_type   = _this select 2;
private ["_chute"];
_dropped_type = typeOf _dropped;
if (typeOf _veh == "B_Heli_Light_01_F") then {_chute = createVehicle [_chute_type, [((position _veh) select 0) - 5,((position _veh) select 1) - 10,((position _veh) select 2)- 4], [], 0, "FLY"];} else {_chute = createVehicle [_chute_type, [((position _veh) select 0) - 5,((position _veh) select 1) - 3,((position _veh) select 2)- 4], [], 0, "FLY"];};
_smoke        = "SmokeshellGreen" createVehicle position _veh;
_chem         = "Chemlight_green" createVehicle position _veh;
   _smoke attachto [_dropped,[0,0,0]];
_chem attachto [_dropped,[0,0,0]]; 
_dropped attachTo [_chute,[0,0,0]];
_heigh = 0;
while {((getPos _chute) select 2) > 0.3} do {sleep 1;_heigh = (getPos _chute) select 2;};
detach _dropped;
//if (_dropped_type isKindOf "ReammoBox") then {_dropped setPos [getpos _dropped select 0, getpos _dropped select 1, _heigh];};
};
BTC_l_obj_fall =
{
_obj    = _this select 0;
_height = (getPos _obj) select 2;
_fall   = 0.09;
while {((getPos _obj) select 2) > 0.1} do 
{

	_fall = (_fall * 1.1);
	_obj setPos [getPos _obj select 0, getPos _obj select 1, _height];
	_height = _height - _fall;
	//hint format ["%1 - %2", (getPos _obj) select 2,_height];
	sleep 0.01;
};
//if (((getPos _obj) select 2) < 0.3) then {_obj setPos [getPos _obj select 0, getPos _obj select 1, 0.2];};
};

Share this post


Link to post
Share on other sites

Could someone please make this an addon if possible so I don't need to change all the helicopters in missions and such to have the lift option? I am a little confused on what to do so if this needs to be in the editor instead of all around please tell me, Thanks.

Share this post


Link to post
Share on other sites

So can the AI use the fast rope?

Le AI possono usare il fast rope?

Comunque sia, gran lavoro al solito!

Share this post


Link to post
Share on other sites

You have to script it, not by default. I'm not very interested in the AI management!

Share this post


Link to post
Share on other sites

Script not fully functioning for me. However the test mission works fine. I am thinking that it is not agreeing with another script I may have running.

The only option available to me is check vehicle status.

Any suggestions. Also using VAS, UPSMON, A very basic respawn script, and a camera script.

Share this post


Link to post
Share on other sites

After messing around for a bit, I managed to get the script functioning.

Is it normal for it to stop working after respawn/revive has happened? The options do not show up in the scroll wheel menu once I have died.

Thank you..

Share this post


Link to post
Share on other sites

ok, somewhat of a noob here when getting these scripts to work. My question is; how do I get any heli to lift anything period. ie, I want my Mohawk/ghosthawk to lift speed boat for mission. In addition to that, I would like this function available for any vehicle to lift, cargo whatever.

Could you please give me specifics on how to complete this. I have script in mission, init on vehicles..now?

Share this post


Link to post
Share on other sites

Giallustio, I'm trying to add some extra features to it, but there's one thing I'm really confused about. What exactly calculates the height between the lifted object and the helicopter? I figured it would be this line

	_height       = ((_rel_pos select 2) + 8.0);

, but it was on 3.5 default and changing it all the way to 8.0 doesn't really help. When I'm close to an object, it still gets connected directly to the helicopter (And releasing it makes the helicopter go boom).

Anyway, so far I just did a (very) basic "collision" thing. This is the general idea. GetPos is used, because getPosATL doesn't include buildings.

ADA_detach_collision = 
{
sleep 5.0;
while {BTC_lifted == 1} do {
	if (((getPos BTC_cargo_lifted) select 2) < 0.5) then {
		_collide_detach = [] call BTC_detach_cargo;
	};
sleep 0.1;
};
};

This is added to the BTC_attach_cargo function:

	if (ADA_active_collide == 1) then {
	_nil = [] spawn ADA_detach_collision;
};

and this to the general init

ADA_active_collide = 1;

As you see it doesn't really do anything then checking the distance to the terrain watched from the object. If it gets too low it automatically disconnect. Let's call it a 2035 auto-detach mechanism to make sure the helicopter doesn't get wrecked because the pilot was flying too low. The 5 second sleep is a graceperiod so it doesn't instantly disconnect when you lift it. Also I still need to create a little direction thing so the chance that it starts rolling is a bit larger (For that extra drama and to prevent you from dropping vehicles at 200km/h). For some reason the Lift options sometimes still shows up after I dropped off the object though (With nothing else liftable near). Any idea why this happened? (I also noticed it without my small change)

Share this post


Link to post
Share on other sites

You have to take some space between the object and the chopper. If you want to increase this distance by script you should use:

 _height       = (_rel_pos select 2) [b]-[/b] 8;

Share this post


Link to post
Share on other sites
You have to take some space between the object and the chopper. If you want to increase this distance by script you should use:

 _height       = (_rel_pos select 2) [b]-[/b] 8;

Thanks, it works perfectly now. I'm going to change the interface a bit as well (For radar. Make it more like the GPS, or even draw the icons on the GPS itself). Then I'll create some textures for the Mohawk that are more BLUEFOR + OPFOR style, so you don't have to fly around in a green transport helo as bluefor. When I'm finished I'll put it here again and if you want you can use that for the release :D

Share this post


Link to post
Share on other sites

Giallustio or anyone else that can help answer this question:

I have an issue with my mission that whenever I have the following script section active your lift radar will not display. Once I commented this section out your lift radar works as intended.

[] spawn {
scriptName "initMission.hpp: mission start";
["vid\ECWC_LEADIN.ogv", false] spawn BIS_fnc_titlecard;
waitUntil {sleep 0.5; !(isNil "BIS_fnc_titlecard_finished")};
[[1864.000,5565.000,0],"US Forces have captured and taken control of the Stratis Airbase. The people of this Island are frightened and unable to defend themselves. It is our mission to liberate this Island and restore a sense of normality to this beautiful island. Your squad leaders have been given their assignments so lets gear up and get to work soldiers!"] spawn BIS_fnc_establishingShot;
titleText [WELCOME_MESSAGE, "PLAIN", 3];
};

Thank you in advance for any help I receive on this :)

Share this post


Link to post
Share on other sites

Hi Giallustio,

May i suggest you some little change it the logic. Nothing is liftable except what you declare.

Easiest to check what is allow in the mission than to run after what is not allow.

so to do that : (i've done it )

use : this setvariable ["BTC_canbe_lift",1,true]; 

line 46 : 	if (_can_lift && ((BTC_cargo isKindOf "Air" && getdammage BTC_cargo != 1) || (format ["%1", BTC_cargo getVariable ["BTC_canbe_lift",0]] == "0"))) then {_can_lift = false;};

line 113 : 	if (_can_lift && ((_cargo isKindOf "Air" && getdammage _cargo != 1) || (format ["%1", BTC_cargo getVariable ["BTC_canbe_lift",0]] == "0"))) then {_can_lift = false;};

Share this post


Link to post
Share on other sites

Gaillustio, your a genius!

This is a superb piece of work!

Thanks a million!

:notworthy:

Share this post


Link to post
Share on other sites

I've implemented this excellent script into my mission and initially had a problem with the HUD not showing.

Managed to isolate the problem. It came down to using cutText. Once cutText has been used the HUD will not show.

The same occurs with titleCut. I suspect this is the problem that Hajimoto is experiencing since both BIS_fnc_titlecard and BIS_fnc_establishingShot make use of this command.

I also tested this on your demo mission just to be sure there's not something else in my mission interfering with your script.

EDIT: Just so you know it seems there is no problem when using titleText

Edited by Foxy

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

×