Jump to content

Recommended Posts

I would like to revive a discusson from armaholic from 6 years ago

pipCam = "camera" camCreate getPos tank;
pipCam camSetTarget tank; 
pipCam camSetFov 0.25;
pipCam cameraEffect ["INTERNAL", "BACK", "rendertarget0"];
pipCam attachTo [tank, [0,0,15]];
pipCam camCommit 0;
tank setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];
tank setObjectTextureGlobal [1, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];
tank setObjectTextureGlobal [2, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];

This code basically spawn a camera above "tank" and replace "tank" texture with it creating active camo effect.
 

Spoiler

20200916175219-1.jpg


But I am having problems with it:
1. Every time I enter Zeus, it turns black
2. How do I turn it off regularly?

Anyone able to help?

Share this post


Link to post
Share on other sites

I tried that years ago (I was also on Armaholic at this time), and I remarked  that can't work because this outside vehicle pip is static and oriented. So, that kills any interest in game.

 

To make it short, In Arma vanilla, where ever you place a vehicle with (wide) outside rear-view mirrors (jungle, urban, meadow...), and turn around the vehicle as player, you will see always the same picture (with the same Mediterranean house, same dirt way...).

Not saying the pip mirror doesn't work once inside the vehicle!.. Just, there is an engine workaround for player pip view once outside of the vehicle, to give you the impress mirrors reflects the actual terrain, but... not.

 

https://www.dropbox.com/s/adzjucekp2qeslc/ArmA 3 Screenshot 2020.09.16 - 12.45.22.69.png?dl=0

 

Share this post


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

I tried that years ago (I was also on Armaholic at this time), and I remarked  that can't work because this outside vehicle pip is static and oriented. So, that kills any interest in game.

 

To make it short, In Arma vanilla, where ever you place a vehicle with (wide) outside rear-view mirrors (jungle, urban, meadow...), and turn around the vehicle as player, you will see always the same picture (with the same Mediterranean house, same dirt way...).

Not saying the pip mirror doesn't work once inside the vehicle!.. Just, there is an engine workaround for player pip view once outside of the vehicle, to give you the impress mirrors reflects the actual terrain, but... not.

 

https://www.dropbox.com/s/adzjucekp2qeslc/ArmA 3 Screenshot 2020.09.16 - 12.45.22.69.png?dl=0

 

I dont really understand what you are saying, because I was driving around in the vehicle and image kept updating all the time.
The only problem I am encountering is that it turns black once I enter zeus

Share this post


Link to post
Share on other sites

@marki980908,

Quote

 I am encountering is that it turns black once I enter zeus...


Cameras are destroyed (or something) when certain menus are opened-- including zeus, I guess. To work around, call the script again.

I'd make a function like,

Spoiler

you_activeCamo=
{ params [["_veh" vehicle player]];

private _cam = "camera" camCreate getPos _veh;
_cam camSetTarget _veh; 
_cam camSetFov 0.25;
_cam cameraEffect ["INTERNAL", "BACK", "rendertarget0"];
_cam attachTo [_veh, [0,0,15]];
_cam camCommit 0;
_veh setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(rendertarget0,1.0)"];
_veh setObjectTextureGlobal [1, "#(argb,512,512,1)r2t(rendertarget0,1.0)"];
_veh setObjectTextureGlobal [2, "#(argb,512,512,1)r2t(rendertarget0,1.0)"];
systemChat "system activated";
};

[tank] call you_activeCamo;

*not tested


and call it whenever necessary.

Have fun!

Share this post


Link to post
Share on other sites
12 hours ago, marki980908 said:

I dont really understand what you are saying, because I was driving around in the vehicle and image kept updating all the time.
The only problem I am encountering is that it turns black once I enter zeus

My bad. Not exactly the same problem, even if the consideration about the rear-view mirrors stays right.

 

So, here is a solution to your problem:

 

[] spawn {
  pipCam = "camera" camCreate getPos tank;
  pipCam camSetTarget tank;  
  pipCam camSetFov 0.25;
  pipCam cameraEffect ["INTERNAL", "BACK", "rendertarget0"];
  pipCam attachTo [tank, [0,0,15]];
  tank setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];
  tank setObjectTextureGlobal [1, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];
  tank setObjectTextureGlobal [2, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];

  while {alive tank} do {
    waitUntil {sleep 0.5; isnull curatorCamera};
    sleep 0.5;
    pipCam cameraEffect ["INTERNAL", "BACK", "rendertarget0"];
    pipCam camCommit 0;
    waitUntil {sleep 0.5; !isnull curatorCamera};

  };

};

Share this post


Link to post
Share on other sites
On 9/17/2020 at 9:26 PM, pierremgi said:

My bad. Not exactly the same problem, even if the consideration about the rear-view mirrors stays right.

 

So, here is a solution to your problem:

 

[] spawn {
  pipCam = "camera" camCreate getPos tank;
  pipCam camSetTarget tank;  
  pipCam camSetFov 0.25;
  pipCam cameraEffect ["INTERNAL", "BACK", "rendertarget0"];
  pipCam attachTo [tank, [0,0,15]];
  tank setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];
  tank setObjectTextureGlobal [1, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];
  tank setObjectTextureGlobal [2, "#(argb,512,512,1)r2t(rendertarget0,1.0)­"];

  while {alive tank} do {
    waitUntil {sleep 0.5; isnull curatorCamera};
    sleep 0.5;
    pipCam cameraEffect ["INTERNAL", "BACK", "rendertarget0"];
    pipCam camCommit 0;
    waitUntil {sleep 0.5; !isnull curatorCamera};

  };

};

Your script works lovely.....in sp but not in mp for some reason
EDIT: I mean that it doesnt even display "camo" in the first place. I dont know if its my code or yours. I will check

Share this post


Link to post
Share on other sites

Well, in MP, the setObjectTextureGlobal must not run everyWhere, and this code is written for local camera event (cameraCurator or not)

 

So you should try to use setObjectTexture  (so local effect), and run the whole script on initPlayerLocal.sqf.

The rest of the commands are OK in this context.

 

  • Like 1

Share this post


Link to post
Share on other sites

Hmm, problem is that I dont have access to initPlayerLocal.sqf and I usually run code like:
 

this setObjectTextureGlobal [0, "#(argb,8,8,3)color(0.25,0.25,0.25,0.3)"];
this setObjectTextureGlobal [1, "#(argb,8,8,3)color(0.25,0.25,0.25,0.3)"];
this setObjectTextureGlobal [2, "#(argb,8,8,3)color(0.25,0.25,0.25,0.3)"];

on the server to paint vehicles black, no problem, even tho its global
Is there a way to make camera event global aswell?

  • Thanks 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

×