Page MenuHomeFeedback Tracker

setPiPEffect command does not work
New, WishlistPublic


The command 'setPiPEffect' claims that it it will set the visual effect of a renderer, however after trying this in the editor, it does not seem to have any effect at all.

Additionally, it seems that many renderers have the same name in their cfgVehicles entry, so how do we even tell the difference? That seems related.

If we had this command, we could use scripts to control PiP screens, such as changing between day and NVG without going into the optics view.


Legacy ID
Steps To Reproduce
  1. Place a Hunter HMG in the editor, player as gunner
  2. Preview mission
  3. Run this script: "rendertarget0" setPiPEffect [0];

(rendertarget0 is the name according to the cfgVehicles class RenderTargets:

Expected: The screen changes from TI to Daysight
Actual: Nothing happens, even if you try the command many different ways.

Additional Information

Event Timeline

Heaney edited Steps To Reproduce. (Show Details)Jun 7 2013, 8:15 PM
Heaney edited Additional Information. (Show Details)
Heaney set Category to Scripting.
Heaney set Reproducibility to Always.
Heaney set Severity to None.
Heaney set Resolution to Open.
Heaney set Legacy ID to 1306172328.May 7 2016, 2:29 PM

Confirmed. Even changing value in config has no effect.

Confirmed. Even using the new module has a limited set of visual effects, none of which really work properly, and the AI seems focused on the player, despite the use of the "setTarget" module.

This PiP thing would be crazy great......if only it would *work*.

When you create your own render with
camera1 = "camera" camCreate (getPos player);
camera1 cameraEffect ["INTERNAL", "FRONT", "myRenderName"];
"myRenderName" setPiPEffect [0];

then the setPiPEffect works. You can name your own renders using the third argument in cameraEffect. (This is currently undocumented on the Wiki).

Note that doing:
camera1 cameraEffect ["INTERNAL", "FRONT", "rendertarget0"];
actually overwrites the PiP in the vehicle and shows you your camera-view. But it seems to overwrite back randomly, works on all vehicles simultaneously, and is overall completely randomly breaking. Definitely unintended behaviour that can sometimes be exploited. I tried to do so for a mission I am working on, but it seems to work differently for MP vs SP as well. The whole thing is weird, but then again, not really intended as such either.

The best would be if the devs would add some more memorypoints to all vehicles, for the various MFDs. That way you could just use setObjectTexture on them.

so for instance:

heli setObjectTexture [0, "#(argb,256,256,1)r2t(myRenderName,1.0)"];
currently renders your camera on the entire outside of a heli.

Would be great if:
heli setObjectTexture [1, "#(argb,256,256,1)r2t(myRenderName,1.0)"];
would render on the left MFD of the pilot

heli setObjectTexture [2, "#(argb,256,256,1)r2t(myRenderName,1.0)"];
would render on the right MFD of the pilot

heli setObjectTexture [3, "#(argb,256,256,1)r2t(myRenderName,1.0)"];
would render on the left MFD of the gunner

heli setObjectTexture [4, "#(argb,256,256,1)r2t(myRenderName,1.0)"];
would render on the right MFD of the gunner

But these memorypoints aren't in the models. The only point available is [0, ...], which renders to the outside (cameo).

Lawlcat added a subscriber: Lawlcat.May 7 2016, 2:29 PM

Confirming as well. This should be far higher in severity, IMHO. If we remove Thermals from a weapon system, the entire point of removing them is negated since the PIP has thermal by default.

dedmen added a subscriber: dedmen.Sep 13 2017, 1:57 PM

It works now.