Jump to content
Sign in to follow this  
lkincheloe

Using SetObjectTexture and bis fnc mp together

Recommended Posts

In my mission I want the players to be able to use a repair script to "re-paint" captured enemy vehicles in a custom texture in order to differentiate them from non-captured vehicles. To do this I've been using SetObjectTexture within repair scripts to achieve this, however this is only done locally on the client initiating the script so it looks the same to everyone else.

I've been trying to fix this by going through BIS_fnc_MP, but I get a rather vague "cannot find script" error when it reaches the call in the repair script. I suspect it's something silly I'm doing so I'm hoping someone can point me in the right direction

Here's the piece of code I'm using to call the function:

[[_oVehicle,"paint_vehicle.sqf"],"BIS_fnc_execVM",true,true] spawn BIS_fnc_MP;

and here's paint_vehicle.sqf, which currently is in the same folder as the script calling the function:

_vehicle = this select 0;

_vehicle setObjectTexture [0,"ambience\modules\images\fia_camo.paa"];

_vehicle setObjectTexture [1,"ambience\modules\images\fia_camo.paa"];

_vehicle setObjectTexture [2,"ambience\modules\images\fia_camo.paa"];

Any suggestions?

Share this post


Link to post
Share on other sites
Setobjecttextureglobal might be worth looking at.

Yea, it was added to solve solve the problem the OP is having. By making it easier to use custom textures in multiplayer.

And I believe the JIP compatibility problem on the wiki is old news. I recall it was fixed a while ago on the dev branch, but not sure if it made it to the regular branch yet.

Share this post


Link to post
Share on other sites
Yea, it was added to solve solve the problem the OP is having. By making it easier to use custom textures in multiplayer.

And I believe the JIP compatibility problem on the wiki is old news. I recall it was fixed a while ago on the dev branch, but not sure if it made it to the regular branch yet.

it did.

tested it today, works fine

Share this post


Link to post
Share on other sites

The only hitch I've found so far is it doesn't carry over on respawn, but in my case I only have a small handful of those so it's easy to correct on a per-case basis.

Thanks for the assist all. :)

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  

×