Jump to content
Play3r

createVehicle to make a radio and intel show up on table

Recommended Posts

i have this two probs i want to spawn on a table when a trigger fire.

i have made a SQF file that i run on ACT.

_handle = execVM "SPAWN\ShowRadioPapir.sqf";

 

i have 2 invisible helipath placed on a table called Radiotable and inteltable

when the script is done i get the hint and the Briefing i my map

but not the radio and intel.

 What i do wrong i don't know.

i have looked at this but  can not see my mistake..

https://community.bistudio.com/wiki/createVehicle

 

this is the complet script:

 

leader1 SwitchMove "AinvPercMstpSrasWrflDnon_Putdown_A­movPercMstpSrasWrflDnon";
sleep 3;

 createVehicle ["ItemRadio", getMarkerPos "radiotable", [] ,0 , "NONE"];
 createVehicle ["EvMoscow", getMarkerPos "inteltable", [] ,0 , "NONE"];
_null = execVM "briefing\diary.sqf"; 

hint"script done";

 

The classnames is found by log-logclasses to clipboard

can someone guide me to what is wrong..
 

Share this post


Link to post
Share on other sites

You should place the objects in editor, then make them invisible:

if (isServer) then {this hideobjectGlobal true};           comment " in the init field of each object";

 

then in your trigger act:

if (isServer) then {object1 hideObjectGlobal false};

 

object1 here as example.

  • Like 1

Share this post


Link to post
Share on other sites

Came to suggest the same thing. I agree with Pierre. You'd have much more control over the items without having to worry about more lines of code to make sure the direction and height of the object are correct.

  • Like 1

Share this post


Link to post
Share on other sites
23 hours ago, pierremgi said:

You should place the objects in editor, then make them invisible:

if (isServer) then {this hideobjectGlobal true};           comment " in the init field of each object";

 

then in your trigger act:

if (isServer) then {object1 hideObjectGlobal false};

 

object1 here as example.

thanks for the help, i did a try with the HideShow module , but this looks easier,  << if (isServer) then {object1 hideObjectGlobal false}; >> i guess that this one can be done in a script also.

So my script looks like this..

 

leader1 SwitchMove "AinvPercMstpSrasWrflDnon_Putdown_A­movPercMstpSrasWrflDnon";
sleep 3;

if (isServer) then {Radioplayer hideObjectGlobal false};
if (isServer) then {EvMoscowIntel hideObjectGlobal false};
_null = execVM "briefing\diary.sqf"; 

 

then i put:

_handle = execVM "SPAWN\ShowRadioIntel.sqf"; 

inside the trigger ACT field.

Share this post


Link to post
Share on other sites

You could shorten that a bit. No need to have 2 if statements with the same condition:
 

leader1 SwitchMove "AinvPercMstpSrasWrflDnon_Putdown_A­movPercMstpSrasWrflDnon";
sleep 3;

if (isServer) then {
	Radioplayer hideObjectGlobal false;
	EvMoscowIntel hideObjectGlobal false;
	};
	
_null = execVM "briefing\diary.sqf"; 

 

Share this post


Link to post
Share on other sites
10 hours ago, XianGrim said:

You could shorten that a bit. No need to have 2 if statements with the same condition:
 


leader1 SwitchMove "AinvPercMstpSrasWrflDnon_Putdown_A­movPercMstpSrasWrflDnon";
sleep 3;

if (isServer) then {
	Radioplayer hideObjectGlobal false;
	EvMoscowIntel hideObjectGlobal false;
	};
	
_null = execVM "briefing\diary.sqf"; 

 

 i have the lines put inside a subtitle dialog so it had to be two lines. but  tanks for the info. i did not know that..

 

  • Like 1

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

×