Jump to content
Cheitan

TV screen with setObjectTexture on dedicated server

Recommended Posts

Hello !

 

Here is the problem : for the needs of a mission I'm currently designing, I have to display various things on various screens here and there. I'm using setObjectTexture, not the global variant but the local one, you are gonna see why.

 

Among various devices I have to retexture, there is some PC screens. All is working as expected with theses screens. But there is also some TV flat screens that have to be retextured. First, I need to put a simple PAA image, exactly as I do on PC screens, and later in the mission, I have to display a camera feed on it, so I'm using procedural textures (RenderToTexture : local, that's why I'm using the non-global command ; of course the script is running on all clients).

 

All this is working perfectly when I try locally, but on the dedicated server only PC screens are retextured. For the TVs, even the "static" simple texture don't appears. Of course, no error message, no other unintended behavior... If it was only the RenderToTexture not being shown, I would search in that direction, but as the static image is also not displayed, I suppose that there is something wrong with the TV screen.

 

Here is my code, very simple, I don't think it's very relevant, but...

//firstly
ecran_1 setObjectTexture [0, "img\connection.paa"];

//then later in the mission
ecran_1 setObjectTexture [0, "#(argb,512,512,1)r2t(camfeed1,1)"];
spycam1 = "camera" camCreate getPos cam1;
spycam1 camSetTarget target1;
spycam1 camSetFov 0.6;
spycam1 camCommit 0;
spycam1 cameraEffect ["Internal", "Back", "camfeed1"];

Did anyone already faced this problem ? Do I miss something ?

Share this post


Link to post
Share on other sites

UPDATE :

The screen was spawned as a simple object, which seems not to cause any issue in solo, only in MP. Love 'dat. Anyway, the static image is now properly displaying, but not the RenderToTexture. I'm not very skilled with this little trick in ArmA coding, is there anything wrong in my code ?

Share this post


Link to post
Share on other sites

UPDATE 2 :
Here again, simple object was messing around ! cam1 was declared as a simple object, as all the other cams that you don't see here. Again in SP there was no problem with it, but in MP the cam was not found and so the view was not created. The same way, if you want the camera to be properly oriented, target1 need to be a "normal" object, not a simple one.

Now all is working as expected. And remember : if you plan to interact in any way possible with an object, it NEEDS to be a normal one. Simple object command, as it's name indicate (obviousness is sometimes not so obvious...), is meant to be used when you need an object that is ABSOLUTELY DEFINITELY TOTALLY COMPLETELY decorative. In my example the "cam1" variable in MP disappears in a spacetime vortex, and so stops to exist as soon as the camera is created. No way to use any handle to the object after 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

×