Jump to content
Sign in to follow this  
bob_gneu

Helicopter Transportation Script [RC 1]

Recommended Posts

I just tried the script in MP and there is a huge problem, the first chopper TAKES ON, it takes the right of transport and all other choppers can't transport.

Is there a way to make it usable by several chooper or at least, restrain the script for only one named chooper ?

Share this post


Link to post
Share on other sites
I just tried the script in MP and there is a huge problem, the first chopper TAKES ON, it takes the right of transport and all other choppers can't transport.

Is there a way to make it usable by several chooper or at least, restrain the script for only one named chooper ?

I can confirm that this is not the case. If you are not initializing your helicopter using my init script you will need to apply the actions and variables to match. If you can forward me your mission i can help further.

Share this post


Link to post
Share on other sites

I don't really know what you are talking about

Here the said mission: link

Thanks for your help

Share this post


Link to post
Share on other sites

1) Your mission is looking for mods that I do not have.

2) In looking at your script it is creating vehicles in line, after classification script has been executed. If you want to classify these vehicles you will need to apply it to them. After calling createVehicle to create a vehicle, call the classification script on it.

[createdVehicle] execVM "scripts\transport\classify.sqf";

Share this post


Link to post
Share on other sites

Here the said mission: link

link updated

thx for your help

Share this post


Link to post
Share on other sites

Thank you for updating it, your custom vehicle was not included, but I was able to run it.

I was unable to reproduce what you seem to be describing.

I was able to perform the following tests:

Ka-60 1 - pick up Hunter, drop on building

Ka-60 1 - pick up Speed boat, drop into water

Land

Ka-60 2 - pick up same Speed boat, drop on to land

Ka-60 2 - pick up different offroad, drop into water

Land

Ka-60 1 - pick up same Speed boat, drop onto land & enjoy explosion.

Share this post


Link to post
Share on other sites

Indeed, the map I gave you is vanilla. And like I said, your script is done the way that I don't need to add custom vehicle in it, but let's put this story of custom veh aside for a moment.

The problem i'm talking is about multiplayer map.

I'll explain it.

someone get in the heli1, turn on the script, take a hunter and fly away

someone else get in the heli2 and a this moment, the "right" on the script is gave to heli2, heli1 loose the "right" on the script and the hunter fall.

Then imagine that there is a dance of helis on the map and the script is like useless :(

So, the idea is to lock the script to a specific named heli, this way, the script will not be gave or deactivated by using other heli

You can also make it multi-usable, but It's more difficult I think.

Share this post


Link to post
Share on other sites

Hmm, Let me give it a run.

Ill get back to you shortly.

## UPDATE 1

I have been able to identify that as a problem. I will do what i can to fix it. Definitely a problem with networking.

Also, if you are transporting something and a coop teammate crashes it will drop your cargo.

I will be in touch with a fix asap.

## UPDATE 2

I have identified and corrected a handful of issues with the RC and am narrowing in on a fix for one final issue that is standing between where it is now and releasing.

Edited by bob_gneu

Share this post


Link to post
Share on other sites

## UPDATE 3

Please check the change log, much has changed in this latest build.

[Gneu.org]

Share this post


Link to post
Share on other sites

the script works for me totally fine until respawn. could you look into that please?

Share this post


Link to post
Share on other sites

The script cannot really address the various respawn scripts. The only way to handle things is to have your respawned vehicle (returned from createVehicle) passed into scripts\transport\classify.sqf.

veh = createVehicle(...);
[veh] execVM "scripts\transport\classify.sqf";

Share this post


Link to post
Share on other sites

i added it in my vehicle.sqf respawn script but with no luck, still doesn't work after vehicle respawn :/

_unit = _type createVehicle _position;

[_unit] execVM "scripts\transport\classify.sqf";

Share this post


Link to post
Share on other sites
i added it in my vehicle.sqf respawn script but with no luck, still doesn't work after vehicle respawn :/

Can you please pack up your mission and send it over to me in an email or stick it on a server somewhere?

Share this post


Link to post
Share on other sites
thank you, you can find a download link to the file in this thread: http://forums.bistudio.com/showthread.php?155077-MP-conqu3st

As I was saying earlier, the following code needs to be added to your vehicle respawn script.

On line 117

[_unit] execVM "scripts\transport\classify.sqf";[/Code]

In context:

http://pastebin.com/hj990rwC

Share this post


Link to post
Share on other sites

The script fails to function after a vehicle is destroyed and then re-spawned. I have followed the steps in the previous posts and placed "[_unit] execVM "scripts\transport\classify.sqf";" in the script re-spawning the vehicle however this does not seem to re-apply the script to the vehicle. I use the same re-spawn script(and version) as the last poster.

/*  
==================================================================================================================
 Simple Vehicle Respawn Script v1.81 for Arma 3
 by Tophe of �stg�ta Ops [OOPS]

 Put this in the vehicles init line:
 veh = [this] execVM "vehicle.sqf"


 Options:
 There are some optional settings. The format for these are:
 veh = [object, Delay, Deserted timer, Respawns, Effect, Dynamic] execVM "vehicle.sqf"

 Default respawn delay is 30 seconds, to set a custom respawn delay time, put that in the init as well. 
 Like this:
 veh = [this, 15] execVM "vehicle.sqf"

 Default respawn time when vehicle is deserted, but not destroyed is 120 seconds. To set a custom timer for this 
 first set respawn delay, then the deserted vehicle timer. (0 = disabled) 
 Like this:  
 veh = [this, 15, 10] execVM "vehicle.sqf"

 By default the number of respawns is infinite. To set a limit first set preceding values then the number of respawns you want (0 = infinite).
 Like this:
 veh = [this, 15, 10, 5] execVM "vehicle.sqf"

 Set this value to TRUE to add a special explosion effect to the wreck when respawning.
 Default value is FALSE, which will simply have the wreck disappear.
 Like this:
 veh = [this, 15, 10, 5, TRUE] execVM "vehicle.sqf"

 By default the vehicle will respawn to the point where it first was when the mission started (static). 
 This can be changed to dynamic. Then the vehicle will respawn to the position where it was destroyed. 
 First set all preceding values then set TRUE for dynamic or FALSE for static.
 Like this:
 veh = [this, 15, 10, 5, TRUE, TRUE] execVM "vehicle.sqf"

 If you you want to set the INIT field of the respawned vehicle, first set all other values, then set init commands. 
 Those must be inside quotations.
 Like this:
 veh = [this, 15, 10, 5, TRUE, FALSE, "this setDammage 0.5"] execVM "vehicle.sqf"

 Default values of all settings are:
 veh = [this, 30, 120, 0, FALSE, FALSE] execVM "vehicle.sqf"


Contact & Bugreport: cwadensten@gmail.com
================================================================================================================== */


private ["_hasname","_delay","_deserted","_respawns","_noend","_dead","_nodelay","_timeout","_position","_dir","_effect","_rounds","_run","_unit","_explode","_dynamic","_unitinit","_haveinit","_unitname","_type"];
if (!isServer) exitWith {};

// Define variables
_unit = _this select 0;
_delay = if (count _this > 1) then {_this select 1} else {30};
_deserted = if (count _this > 2) then {_this select 2} else {120};
_respawns = if (count _this > 3) then {_this select 3} else {0};
_explode = if (count _this > 4) then {_this select 4} else {false};
_dynamic = if (count _this > 5) then {_this select 5} else {false};
_unitinit = if (count _this > 6) then {_this select 6} else {};
_haveinit = if (count _this > 6) then {true} else {false};

_hasname = false;
_unitname = vehicleVarName _unit;
if (isNil _unitname) then {_hasname = false;} else {_hasname = true;};
_noend = true;
_run = true;
_rounds = 0;

if (_delay < 0) then {_delay = 0};
if (_deserted < 0) then {_deserted = 0};
if (_respawns <= 0) then {_respawns= 0; _noend = true;};
if (_respawns > 0) then {_noend = false};

_dir = getDir _unit;
_position = getPosASL _unit;
_type = typeOf _unit;
_dead = false;
_nodelay = false;


// Start monitoring the vehicle
while {_run} do 
{	
sleep (2 + random 10);
     if ((getDammage _unit > 0.8) and ({alive _x} count crew _unit == 0)) then {_dead = true};

// Check if the vehicle is deserted.
if (_deserted > 0) then
{
	if ((getPosASL _unit distance _position > 10) and ({alive _x} count crew _unit == 0) and (getDammage _unit < 0.8)) then 
	{
		_timeout = time + _deserted;
		sleep 0.1;
	 	waitUntil {_timeout < time or !alive _unit or {alive _x} count crew _unit > 0};
		if ({alive _x} count crew _unit > 0) then {_dead = false}; 
		if ({alive _x} count crew _unit == 0) then {_dead = true; _nodelay =true}; 
		if !(alive _unit) then {_dead = true; _nodelay = false}; 
	};
};

// Respawn vehicle
     if (_dead) then 
{	
	if (_nodelay) then {sleep 0.1; _nodelay = false;} else {sleep _delay;};
	if (_dynamic) then {_position = getPosASL _unit; _dir = getDir _unit;};
	if (_explode) then {_effect = "M_AT" createVehicle getPosASL _unit; _effect setPosASL getPosASL _unit;};
	sleep 0.1;

	deleteVehicle _unit;
	sleep 2;
	_unit = _type createVehicle _position;
	_unit setPosASL _position;
	_unit setDir _dir;
	[b][_unit] execVM "scripts\transport\classify.sqf";[/b]
	_dead = false;



	// Check respawn amount
	if !(_noend) then {_rounds = _rounds + 1};
	if ((_rounds == _respawns) and !(_noend)) then {_run = false;};
};
};

Correction: It should be noted that the script does indeed work but I must disconnect from the server and reconnect in order to attach cargo again on a re-spawned vehicle.

Edited by hazard3474
correction

Share this post


Link to post
Share on other sites

good job

Edited by j4ck3ss

Share this post


Link to post
Share on other sites

Hello, Ican not download the latest version from your site. the links do not work, and the one on armaholic is your Initial release. It has not been updated to 1.3 yet

Edited by Lordprimate

Share this post


Link to post
Share on other sites
I contacted Bob about this and he has fixed the link!

Release frontpaged on the Armaholic homepage

Are you sure you've got the latest version? The latest files in the archive are dated 9th May 2013.

Share this post


Link to post
Share on other sites

To make this work with respawn you have to edit your respawn script.

Find a line where it creates the vehicle. _unit = createVehicle ....

And add this under it: [[[_unit],"scripts\transport\classify.sqf"],"BIS_fnc_execVM",true,false] spawn BIS_fnc_MP;

(The problem here is the vehicle needs to be classified to be able to lift, classifying is done on start up but also needs to be done on every newly created vehicle. Respawn scripts are usually server side, but we need to classify vehicles on clients thats why BIS_fnc_MP)

Edited by aeroson

Share this post


Link to post
Share on other sites
Guest
Are you sure you've got the latest version? The latest files in the archive are dated 9th May 2013.

It is the archive provided by the author himself. He calls it version 1.3 so I take it it is the latest.

Share this post


Link to post
Share on other sites

*** POST REMOVED ***

bob_gneu updated script to include new beta vehicles.

Edited by Beerkan
Errors in init.sqf for offset for Orca PO30 (Ka60)

Share this post


Link to post
Share on other sites

I've updated the above scripts to cater for the newly discovered Vehicles and Helos' in the Beta.

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  

×