Jump to content
Sign in to follow this  
norrin

Example scripts that use the attachTo command

Recommended Posts

Hi all,

The script works for me but unfortunately it stopped to work after the first respawn of the c130. :confused:

Tested on "Co_30_EvolutionUSMC_v08.Chernarus".

I am having the same problem tested it with "co30_Domination_1_00A2T10_West.Chernarus"

C-130j Initialization:res=[this] execVM "c130cargo.sqf";handle = [this, 120] execVM "x_scripts\x_vehirespawn2.sqf"

Edited by G-Man-853

Share this post


Link to post
Share on other sites

C130J

_vehicle_21 = objNull;
if (true) then
{
 _this = createVehicle ["C130J", [4621.999, 2555.9509], [], 0, "CAN_COLLIDE"];
 _vehicle_21 = _this;
 _this setDir 121.27563;
 _this setVehicleInit "[this] execVM ""C130\C130cargo.sqf"";";
};

MV22

_vehicle_23 = objNull;
if (true) then
{
 _this = createVehicle ["MV22", [4648.8774, 2579.8801], [], 0, "CAN_COLLIDE"];
 _vehicle_23 = _this;
 _this setDir 166.91376;
 _this setVehicleInit "[this] execVM ""mv22\mv22cargo.sqf"";";
};

I create 2 directory and renamed the script: one for C130j and one for MV22.

(I made some modifications > C130J can drop Tank but MV22 doesn't.)

It works, but only once :j:

Share this post


Link to post
Share on other sites

I've posted an respawnscript somewhere on this forum that allows to save an init-line for respawning. That should do the trick.

Otherwise the script would have to be put in a loop and a vehiclevarname will have to be used. Then however you would atleast need an respawnscript that keeps the vehiclevarname.

Cestcomi, about that mv22 version: Did you notice the part in the script where the boundingbox of the object you want to load is checked ? Hope you adjusted that too.

Oh and here's the link for the respawnscript I mentioned: http://forums.bistudio.com/showthread.php?t=79070

Share this post


Link to post
Share on other sites

Did anyone ever get that aircraft towing tractor to work?

I know a lot of people which sort of needs it for missions so if anyone has it, please post it up.

Share this post


Link to post
Share on other sites

Hmmm, I guess I could do that. Just not anytime soon.

Share this post


Link to post
Share on other sites

Hello,

I'm having an issue with the c130 cargo script. It works great when I preview it in the editor, or create an online server and load the map however when i upload it to a dedicated server the cargo script never becomes activated. Do I need to initialize the script somewhere else in the mission file?

Thanks, T

**EDIT** I fixed the problem it was a minor coding problem (BTW the mission was domi)

Edited by TenaciousB

Share this post


Link to post
Share on other sites

Hey guys, saw this thread and thought I'd share how I've toyed with attachTo. Very simple, only the second one uses any external scripting, and maybe 6 lines at that (mostly to add a new action).

Share this post


Link to post
Share on other sites
Hey guys, saw this thread and thought I'd share how I've toyed with attachTo. Very simple, only the second one uses any external scripting, and maybe 6 lines at that (mostly to add a new action).

Could you post the script you used to do this? Way Cool! :)

Share this post


Link to post
Share on other sites

I actually deleted the files after I was done playing with them :( It's real simple, the first doesn't even use any external scripting. It's just an attachTo and detach when you reach a certain waypoint.

It's harder doing an insertion because you have to try to figure out how to set it right in the cargo area, otherwise when it detaches it'll start bouncing around wildly and *maybe* exit through the back. I think I used [0,-1,-0.5].

For the extraction one... pretty much the same thing, just attach when you're inside. I added scripts just so I could have that "Move to Chinook seat" action. Also, I found that if you're sitting in the cargo space, and the crrc is in there... it'll appear as if it's just outside the ramp for you, which sucks :( It wont look like its inside right next to you even though it is.

Share this post


Link to post
Share on other sites
I've posted an respawnscript somewhere on this forum that allows to save an init-line for respawning. That should do the trick.

Otherwise the script would have to be put in a loop and a vehiclevarname will have to be used. Then however you would atleast need an respawnscript that keeps the vehiclevarname.

Cestcomi, about that mv22 version: Did you notice the part in the script where the boundingbox of the object you want to load is checked ? Hope you adjusted that too.

Oh and here's the link for the respawnscript I mentioned: http://forums.bistudio.com/showthread.php?t=79070

Hi Tajin,

I tried your respawn script and it works. But once again, "cargoscript" stopped to work after the first respawn.

For information, I have renamed "cargoscript" to "mv22cargo.sqf" and "mv22cargoscript.sqf". I changed both files so that they correspond to the new name and I put everything in the directory "mv22\".

So I tried with this script (Simple Vehicle Respawn Script v1.6) but same result after the first respawn (I had no doubt of the result :rolleyes:).

I give you the trick here if someone could find a solution:

Co_20_EVO_USMC_v095b.Chernarus.zip

I have made some modifications to the following files because the mod has his own system for respawn (I only want to use Simple Vehicle Respawn or something else like Tajin's script):

- data\scripts\sinit.sqf

- data\scripts\EVO_MakeBase.sqf (many vehicles and other stuff are in this file)

- mission.sqm (the others vehicles/stuff and the MV22 are in this file !)

This is what you will find in "missions.sqm" for the first MV22:

	class Item363
	{
		position[]={4621.999,9,2555.9509};
		azimut=121.384;
		id=442;
		side="EMPTY";
		vehicle="MV22";
		skill=0.60000002;
		init="veh = [this, 300, 300, 0, FALSE, FALSE, [this] execVM ""mv22\mv22cargo.sqf""] execVM ""vehicle.sqf"";";
	};

I stopped counting the number of test I did :p

But I don't understand why Mando Hitch v1.5 works great and not "cargoscript" ?

Principle is really the same, no ?

P.S.: I offer a good Belgian beer at first which finds a solution.

:drinking: ;)

Share this post


Link to post
Share on other sites
Hi Tajin,

I tried your respawn script and it works. But once again, "cargoscript" stopped to work after the first respawn.

For information, I have renamed "cargoscript" to "mv22cargo.sqf" and "mv22cargoscript.sqf". I changed both files so that they correspond to the new name and I put everything in the directory "mv22\".

So I tried with this script (Simple Vehicle Respawn Script v1.6) but same result after the first respawn (I had no doubt of the result :rolleyes:).

I give you the trick here if someone could find a solution:

Co_20_EVO_USMC_v095b.Chernarus.zip

I have made some modifications to the following files because the mod has his own system for respawn (I only want to use Simple Vehicle Respawn or something else like Tajin's script):

- data\scripts\sinit.sqf

- data\scripts\EVO_MakeBase.sqf (many vehicles and other stuff are in this file)

- mission.sqm (the others vehicles/stuff and the MV22 are in this file !)

This is what you will find in "missions.sqm" for the first MV22:

	class Item363
	{
		position[]={4621.999,9,2555.9509};
		azimut=121.384;
		id=442;
		side="EMPTY";
		vehicle="MV22";
		skill=0.60000002;
		init="veh = [this, 300, 300, 0, FALSE, FALSE, [this] execVM ""mv22\mv22cargo.sqf""] execVM ""vehicle.sqf"";";
	};

I stopped counting the number of test I did :p

But I don't understand why Mando Hitch v1.5 works great and not "cargoscript" ?

Principle is really the same, no ?

P.S.: I offer a good Belgian beer at first which finds a solution.

:drinking: ;)

I've got same problem too :(

Share this post


Link to post
Share on other sites
I've got same problem too :(

I find a solution! Well, I find the problem! xD :D Now need someone who can fix it and give us the solution! The problem is in the "x_vrespawn2.sqf" (<--- in my case this is the respawn script): I think if someone can put the code:

nul = [this] execVM "c130cargo.sqf

in the respawn script when C130 appears it has got the load vehicles script! In this case you must use the "x_vrespawn2.sqf" only for c130 or you can name it "x_vrespawn4c130.sqf" and use it only for c130! :yay:

But I can't understand the "x_vrespawn2.sqf" language :( Some one can help us? :(

This is the "x_vrespawn2.sqf" script:

// by Xeno

private ["_vec_array", "_vehicle", "_number_v", "_kind", "_truck_ammo", "_truck_fuel", "_truck_rep", "_i", "_vec_a", "_disabled", "_type", "_empty", "_hasbox"];

if (!isServer) exitWith{};

#include "x_setup.sqf"

#include "x_macros.sqf"

_vec_array = [];

{

_vehicle = _x select 0;

_number_v = _x select 1;

_kind = _x select 2;

_vec_array = _vec_array + [[_vehicle,_number_v,_kind,position _vehicle,direction _vehicle,typeOf _vehicle]];

_vehicle setVariable ["D_OUT_OF_SPACE", -1];

switch (_kind) do {

case "MR": {

call compile format ["MRR%1=_vehicle;publicVariable ""MRR%1"";", _number_v];

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

};

#ifdef __TT__

case "MRR": {

call compile format ["MRRR%1=_vehicle;publicVariable ""MRRR%1"";", _number_v];

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

};

#endif

case "TR": {

call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];

_vehicle setAmmoCargo 0;

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

};

#ifdef __TT__

case "TRR": {

call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];

_vehicle setAmmoCargo 0;

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

};

#endif

case "TTR": {

call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];

_vehicle setAmmoCargo 0;

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

};

#ifdef __TT__

case "TTRR": {

call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];

_vehicle setAmmoCargo 0;

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

};

#endif

case "TRA": {

call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];

_vehicle setAmmoCargo 0;

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

};

#ifdef __TT__

case "TRAR": {

call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];

_vehicle setAmmoCargo 0;

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

};

#endif

case "MV": {

MEDVEC = _vehicle; publicVariable "MEDVEC";

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

};

#ifdef __TT__

case "MVR": {

MEDVECR = _vehicle; publicVariable "MEDVECR";

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

};

#endif

};

} forEach _this;

_this = nil;

_truck_ammo = d_own_trucks select 0;

_truck_fuel = d_own_trucks select 1;

_truck_rep = d_own_trucks select 2;

sleep 65;

while {true} do {

sleep 8 + random 5;

if (X_MP) then {

waitUntil {sleep (1.012 + random 1);(call XPlayersNumber) > 0};

};

__DEBUG_NET("x_vrespawn2.sqf",(call XPlayersNumber))

for "_i" from 0 to (count _vec_array - 1) do {

_vec_a = _vec_array select _i;

_vehicle = _vec_a select 0;

_kind = _vec_a select 2;

_disabled = false;

if (damage _vehicle > 0.9) then {

_disabled = true;

} else {

if (_kind == "TR") then {

switch (_type) do {

case _truck_ammo: {

_vehicle setAmmoCargo 1;

};

case _truck_fuel: {

_vehicle setFuelCargo 1;

};

case _truck_rep: {

_vehicle setRepairCargo 1;

};

};

};

};

if (_vehicle call XOutOfBounds) then {

_outb = _vehicle getVariable "D_OUT_OF_SPACE";

if (_outb != -1) then {

if (time > _outb) then {_disabled = true};

} else {

_vehicle setVariable ["D_OUT_OF_SPACE", time + 600];

};

} else {

_vehicle setVariable ["D_OUT_OF_SPACE", -1];

};

sleep 0.01;

_empty = (if (({alive _x} count (crew _vehicle)) > 0) then {false} else {true});

if ((_disabled && _empty) || (_empty && !(alive _vehicle))) then {

_hasbox = _vehicle getVariable "d_ammobox";

if (isNil "_hasbox") then {

_hasbox = false;

};

if (_hasbox) then {

ammo_boxes = ammo_boxes - 1;

X_JIPH setVariable ["ammo_boxes",ammo_boxes,true];

["ammo_boxes",ammo_boxes] call XSendNetVarClient;

};

sleep 0.1;

deletevehicle _vehicle;

sleep 0.5;

_vehicle = objNull;

_vehicle = (_vec_a select 5) createvehicle (_vec_a select 3);

_vehicle setpos (_vec_a select 3);

_vehicle setdir (_vec_a select 4);

_vec_a set [0, _vehicle];

_vehicle setVariable ["D_OUT_OF_SPACE",-1];

_number_v = _vec_a select 1;

switch (_kind) do {

case "MR": {

call compile format ["MRR%1=_vehicle;publicVariable ""MRR%1"";", _number_v];

if (X_SPE) then {

_vehicle addAction ["MHQ Menu","x_scripts\x_vecdialog.sqf",[],-1,false];

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkdriver.sqf";}];

};

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

};

#ifdef __TT__

case "MRR": {

call compile format ["MRRR%1=_vehicle;publicVariable ""MRRR%1"";", _number_v];

if (X_SPE) then {

_vehicle addAction ["MHQ Menu","x_scripts\x_vecdialog.sqf",[],-1,false];

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkdriver.sqf";}];

};

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

};

#endif

case "TR": {

call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];

_vehicle setAmmoCargo 0;

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

if (X_SPE) then {

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];

};

#endif

};

#ifdef __TT__

case "TRR": {

call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];

_vehicle setAmmoCargo 0;

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

if (X_SPE) then {

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];

};

};

#endif

case "TTR": {

call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];

_vehicle setAmmoCargo 0;

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

#endif

if (X_SPE) then {

if (__AIVer || str(player) in d_is_engineer) then {

_vehicle addAction["Load Static","scripts\load_static.sqf",[],-1,false];

_vehicle addAction["Unload Static","scripts\unload_static.sqf",[],-1,false];

};

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checktrucktrans.sqf";}];

};

};

#ifdef __TT__

case "TTRR": {

call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];

_vehicle setAmmoCargo 0;

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

if (X_SPE) then {

if (__AIVer || str(player) in d_is_engineer) then {

_vehicle addAction["Load Static","scripts\load_static.sqf",[],-1,false];

_vehicle addAction["Unload Static","scripts\unload_static.sqf",[],-1,false];

};

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checktrucktrans.sqf";}];

};

};

#endif

case "TRA": {

call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];

_vehicle setAmmoCargo 0;

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

if (X_SPE) then {

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];

};

#endif

};

#ifdef __TT__

case "TRAR": {

call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];

_vehicle setAmmoCargo 0;

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

if (X_SPE) then {

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];

};

};

#endif

case "MV": {

MEDVEC = _vehicle; publicVariable "MEDVEC";

#ifdef __TT__

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];

if (X_SPE) then {

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];

};

#endif

};

#ifdef __TT__

case "MVR": {

MEDVECR = _vehicle; publicVariable "MEDVECR";

_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];

if (X_SPE) then {

_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];

};

};

#endif

};

};

sleep 8 + random 5;

};

};

Edited by M3th0s

Share this post


Link to post
Share on other sites
I was playing around with a way to launch landing craft from the LHD. This is just a test version exploring possibilities. It doesn't support AI. I presume this rig is meant for some sort of boat hoisting.

Download test mission: LHD_BoatLaunch.utes.pbo

To use:

- there's an action on the towing tractor to teleport to the boat launch platform (since there are no stairs).

- turn on the boat engine to launch the boat into the water

- turn off the boat engine to lift the boat back into the hoisting rig while under it

- use 'get out' to get back on platform

- then use action on the warning signs to teleport to deck (the signs also prevent you from slipping off the launch platform)

Design hurdles and findings:

- it seems you can't use the LHD to attach the boat since the boat keeps dropping every 1 second as if the attach is not checking it regularly enough. Therefore I used the towing tractor for all attach and teleport actions.

- facing the boat at 180 make the default getin/getout actions work better without falling in water

- It's a shame the rear LHD dock doors are closed. It would have been better just to leave them open, since the water is already usable inside the bay. Hope they improve that.

I was put this scripts in Xneo's "The longest day" mission. But I can't play with it, when I go to platform it show two boats on there, and I can't see anything in actionmanu.

I put "nul=[] execVM "Mission\BoatLaunch\LHD_Init.sqf";" in the missions init.sqf is it correct? Can you tell how to solution this problem?

arma22009-08-0809-21-13-03.jpg

> 100kb

Edited by W0lle

Share this post


Link to post
Share on other sites

Here's another one.

Tow aircraft script

AUGUST 2009

by norrin

based on an idea from David Campagna

tested in ArmA v1.03 on dedicated server

Download

http://norrin.org/downloads/ArmA2/attachTo/towC130.utes.rar

Description

Script allows you to tow aircraft around using the US towing tractor

How it works

Jump in the tow tractor and back up towards the front of an aircraft - make sure you are facing almost the same direction and you will get an action to tow the aircraft. This attaches the plane to the tractor. While attached you get an action to unattach the aircraft.

To implement in your own missions

1. Copy the c130tow directory to your mission file.

2. In the init line of the tractor put:

nul = [this]execVm "c130Tow\c130Tow_init.sqf";

Share this post


Link to post
Share on other sites

Thx Norrin !

Works great.

You can make a 360° very quickly with the plane at the rear of the tractor

:D

Share this post


Link to post
Share on other sites

Simple beginners question, I'm using Norrins attach mount_vcl_init.sqf scripts etc successfully to load and unload ammo crates.

But, how do I configure these scripts/vehicle init line so vehicle is preloaded with ammo crate at mission start (AAV's conducting amphibious assualt)???

Share this post


Link to post
Share on other sites
I was put this scripts in Xneo's "The longest day" mission. But I can't play with it, when I go to platform it show two boats on there, and I can't see anything in actionmanu.

I put "nul=[] execVM "Mission\BoatLaunch\LHD_Init.sqf";" in the missions init.sqf is it correct? Can you tell how to solution this problem?

arma22009-08-0809-21-13-03.jpg

> 100kb

That's what I did with mission I'm working on and it works. I'm not sure why it's making 2 boats for you. Maybe a conflict with another script? I also Extracted the .pbo and put the .sqf's in my directory since I had to modify it to be playable. I disabled the "getout" portion so you could actually leave the boat without being ported back to the ship. The only other problem I have is if you turn off the engine and back on again you get ported back to the hoist no matter where you are. I think it's not supposed to if you're more than 30 ft away but it still does.

Can anyone tell me how to fix that?

// Desc: "engine" on/off event handler
//-----------------------------------------------------------------------------
_boat = _this select 0;
_engineOn = _this select 1;
//player sidechat str _this; 

if (_engineOn) then 
{
 for [{_i = -6}, {_i >= -10 /*&& (engineOn _boat)*/}, {_i = _i - 0.1}] do
 {
   _boat attachTo [iCE_USS_Khe_Sanh_BoatLaunch, [-3.8, 0.4, _i]];
   _boat setDir 180; // must be 180, or getOut will jump in water
   sleep 0.025;
 };
 detach _boat;
}
else
{
 // find 2d distance
 _pos1 = getPos _boat;
 _pos2 = getPos ICE_USS_Khe_Sanh_BoatLaunch;
 _pos1 set [2, 0];
 _pos2 set [2, 0];
 _dist2D = _pos1 distance _pos2;

 if (_dist2D < 8) then 
 {
   hint "Lifting boat";
   for [{_i = -12}, {_i <= -6 /*&& (!engineOn _boat)*/}, {_i = _i + 0.1}] do
   {
     _boat attachTo [iCE_USS_Khe_Sanh_BoatLaunch, [-3.8, 0.4, _i]];
     _boat setDir 180; // must be 180, or getOut will jump in water
     sleep 0.05;
   };
   /* optional
   sleep 2;
   doGetOut player;
   [objNull, player, -1] execVM "Mission\BoatLaunch\LHD_MoveToPlatform.sqf";
   */
 }
 else
 {
   if (_dist2D < 30) then 
   {
     hint format["Too far from lifter: %1m", round _dist2D];
   };
 };
};

Share this post


Link to post
Share on other sites
Simple beginners question, I'm using Norrins attach mount_vcl_init.sqf scripts etc successfully to load and unload ammo crates.

But, how do I configure these scripts/vehicle init line so vehicle is preloaded with ammo crate at mission start (AAV's conducting amphibious assualt)???

OK a little update on my question.

I put this in my ammo box init line where AAV1 is the name of the destination vehicle.

this attachTo [AAV1,[0,0,0.5]];

This works well: the ammo crate is definitley with the vehicle when I drive it around. However Norrins script doesn't recognize it as loaded, just its proximity. So after driving it somewhere after initial mission start, I get out, and have to 'Load' the box first, prior to 'unloading' it.

Any thoughts what I need to tinker with to get the Load thing initialised?

Share this post


Link to post
Share on other sites

Can't seem to get setting the variable to work right due to how the script works (it defaults to clearing it right away.

However, to make the crate look better on the AAV, use this:

this attachTo [AAV1,[.33,-1.5,1.2]];

Now, to make the SCRIPT put it there, try something like this in mount_vcl.sqf:

	_loc = switch (typeOf _vcl) do {
	case "LAV25_HQ": {[.5,-1.5,.9]}; // LAVHQ
	case "hilux1_civil_1_open": {[0.3,-1.5,0.3]}; // pickup
	case "BMP2_HQ_CDF": {[0.3,-2.3,-2.8]}; // BMPHQ
	case "AAV": {[.33,-1.5,1.2]}; // AAV
	default {[0.3,-1.5,0.3]};
};
_mountVcl attachTo [_vcl,_loc];

instead of the normal _mountVcl attachTo [_vcl, [0.3,-1.5,0.3]]; line.

Share this post


Link to post
Share on other sites
Can't seem to get setting the variable to work right due to how the script works (it defaults to clearing it right away.

Cool, I've been fiddling for awhile too, and still no luck!

However, to make the crate look better on the AAV, use this:

this attachTo [AAV1,[.33,-1.5,1.2]];

Now, to make the SCRIPT put it there, try something like this in mount_vcl.sqf:

	_loc = switch (typeOf _vcl) do {
	case "LAV25_HQ": {[.5,-1.5,.9]}; // LAVHQ
	case "hilux1_civil_1_open": {[0.3,-1.5,0.3]}; // pickup
	case "BMP2_HQ_CDF": {[0.3,-2.3,-2.8]}; // BMPHQ
	case "AAV": {[.33,-1.5,1.2]}; // AAV
	default {[0.3,-1.5,0.3]};
};
_mountVcl attachTo [_vcl,_loc];

instead of the normal _mountVcl attachTo [_vcl, [0.3,-1.5,0.3]]; line.

Works a treat cheers!!!

Share this post


Link to post
Share on other sites
Problem has been solved by some great work from ZSU Victim, cheers!

Can you post what you did to fix it please?

Share this post


Link to post
Share on other sites

Newb question - Can the heli door script be adapted to have passenger in say a Littlebird shoot their weapons? so rather than "move" to door the player stays in the seated position? Guess the animation for kneeling etc.. probably prevents this??

Anyway - as always amazed and appreciative of the amazing work the community does with these addons

cheers

Share this post


Link to post
Share on other sites

I have an issue with the heliDoor script, perhaps I'm doing something wrong. I just tested it out with an AI pilot hovering in place and then myself getting to the door positiion. As soon as I get to it, he starts moving again, like in a circle, rather than staying still. Any ideas?

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  

×