Jump to content
Sign in to follow this  
Alex116

UAV - Module not syncing with object added trough script.

Recommended Posts

Hey,

I've been setting up a simple UAV in my mission. So I've placed the following things.

- MQ9

- UAV Module

- Player

And synced both the player and MQ9 to the module.

UAV Module init:

this setVariable ["name","MQ-9R"]; this synchronizeObjectsAdd [(unitBackpack player)]

Player's init:

removeBackpack this; this addBackpack "US_UAV_Pack_EP1"; 

And it worked. I was able to access the UAV without using a terminal.

Now here's thhe problem. I'd like the player to run a script that gives him some gear. So I've typed this into his init.

_null = [this, "SFGearUAV"] execVM "scripts\gear.sqf";

The player gets his gear, but is unable to access the UAV. Even tough I added the US_UAV_Pack_EP1 into the gear.sqf, and thhe player does actually have the UAV backpack on him.

I think the UAV module and gear scripts are unable to synchronize with eachother, is there a way to make this work tough?

Thanks in advance.

Edited by Alex116

Share this post


Link to post
Share on other sites

Noone? I'm really stuck here, just cant get this to work.

Share this post


Link to post
Share on other sites

Try to give this

uav setVariable ["name","MQ-9R"]; uav synchronizeObjectsAdd [(unitBackpack player)]  

in init.sqf after waitUntil{!(isNil "BIS_fnc_init")};

or with few secs pause. Then the equipment should be loaded properly, now it seems that it's syncing with empty object.

Share this post


Link to post
Share on other sites

You, Sir, Rock.

Thanks a lot. That did the trick.

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  

×