Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: za
Location:
Occupation: N/A
Age: 22
In-game name: Prejudice

 
#1 Posted at 2018-08-19 15:44        
     
Hello,



So i've been making a multiplayer mission for my friends and myself and i've run into a snag. For one of the missions I needed a way to transport vehicles via the c130j, mv-22 and Ch-47. I found an old script that worked and edited a bit (Don't worry I still gave credit to the original creator) to make is so i could fit a tank in any of the given 3 transporters. Unfortuantly these vehicles are too big and stick out the side of the aircraft while flying and it looks rather silly, I found the following line of code
objectName hideObject true; 

This hid the given object from site once loaded in, however upon testing the mission with my friends. only the person who executes the loading command will not see the vehicle, everyone else can see the vehicle still sticking out the top. I reasearched a bit but am still unsure as to how to execute this command globally. I found this command.
_nic = [nil, mantohide, "per", rHideObject, true ] call RE;
Which looks like this in my actual script
if ((_Transporter isKindOf "CH47_base_EP1") ) then {
	if (_Object isKindOf "Car") then {
		_object = [nil, mantohide, "per", rHideObject, true ] call RE;
			_Object attachTo [_Transporter,[0,1.5,-0.5]];
	} else {
		_Object[nil, mantohide, "per", rHideObject, true ] call RE;
		_Object attachTo [_Transporter,[0,1.4,-0.8]];
	};
	
	} else {
		_Object = [nil, mantohide, "per", rHideObject, true ];
		_Object attachTo [_Transporter,[0,1.4,-0.2]];
	};
This doesn't do anything it actually pausing the script past a certain point pretty much meaning it breaks it.

my original code using just the Hideobject looked like this, and I just replaced the objectName hideObject true; with _Object[nil, mantohide, "per", rHideObject, true ] call RE;
if ((_Transporter isKindOf "CH47_base_EP1") ) then {
	if (_Object isKindOf "Car") then {
		_Object hideObject true;
		_Object attachTo [_Transporter,[0,1.5,-0.5]];
	} else {
		_Object hideObject true;
		_Object attachTo [_Transporter,[0,1.4,-0.8]];
	};
	
	} else {
		_Object hideObject true;
		_Object attachTo [_Transporter,[0,1.4,-0.2]];
	};

Can anyone suggest an alternitive method or maybe advise me on how to properly position the given code by Bohemia
here is the link to the Hideobject web page Hide Object syntax and coding

Thanks

Casualties of war.

Author Message


Posts: 48
Rank:


Level: Member

Country: de
Location: K-Town
Occupation: Medic
Age: 38
In-game name: Officer D

 
#2 Posted at 2018-08-20 09:01        
     
Try something like this :
_Object setVehicleInit "this hideObject true";
processInitCommands;


Advertisement


Author Message


Posts: 151
Rank:


Level: Member

Country: us
Location: Pennsylvania
Occupation:
Age:
In-game name: Xian

 
#3 Posted at 2018-08-20 14:11        
     
EDIT: Removed comment because I'm an idiot and didn't realize this was Arma 2 XD