Jump to content
Sign in to follow this  
demonized

small image on top of big image in gps window or up on screen

Recommended Posts

I must admit, i did not search too hard on this.

Mostly because i was not sure on what to search for.

Some background info:

consider a shooting range with a popup target, target get hit, bullet position is recorded.

The question:

all the time the gps window or something on screen is showing a picture of the target (no holes in it)

now i want to add a small image(bullethole) on top of the big target image.

showing the big target image, with the small bulletimage on top of it relative to the hit?

Faking visual hit position, then add another small image on top of big target image for next hit and show big target with 2 bulletholes etc...

Is this possible?

Edited by Demonized

Share this post


Link to post
Share on other sites

as far as im aware, you cant overlap or stack images on top of each other, arma 2 doesnt really have support for that.

however, i believe it may be possible to create an array of pictures (with and without bullet holes in them) and replace the old image with the new one, based on where the target was hit.

but this may prove to be very tedious business. thats all i can think of tho for a solution

Share this post


Link to post
Share on other sites

Maybe scripting a camera in there? I'm not sure if it's even possible to have a live camera while running a mission... Or maybe when your done a camera is spawned on that target for a certain amount of time and it gives you your total points in a hint?

Just some suggestion I'm throwing out there, hope this helps a little!

Share this post


Link to post
Share on other sites

nope that would basically be render to texture which is currently not supported by arma 2

Share this post


Link to post
Share on other sites

Not to get your hopes up, because I'm not sure on this, but there was a function used in Eagle Wing called Picture in Picture. If you recall the part where a little 'UAV feed' pops onto your screen and you watch planes taxi down the runway before you shoot them down, the function was used for that.

I don't know if it would be any help to you but here's the actual script:

scriptName "fn_pip.sqf";
/*
File: pip.sqf
Author: Karel Moricky

Description:
Picture In Picture

Parameter(s):
	_this: Picture or Array of pictures

Returns:
Nothing
*/
private ["_input","_inputtype","_layer","_display","_pip","_file1","_file2","_layer1","_layer2"];
disableserialization;
_input = _this select 0;
_inputtype = typename _input;

//--- Single picture
if (_inputtype == typename "") then {
if (_input != "") then {
	_layer = if (count _this > 1) then {_this select 1} else {100011};
	_display = uinamespace getvariable "str_pip";
	if (isnil "_display") then {
		100011 cutrsc ["PIP","plain"];
		_display = uinamespace getvariable "str_pip";		
	};
	if (isnull _display) then {
		100011 cutrsc ["PIP","plain"];
		_display = uinamespace getvariable "str_pip";
	};
	_pip = _display displayctrl _layer;
	_pip ctrlsettext _input;
	_pip ctrlcommit 0;
	rah1 setObjectTexture [1,_input];
	rah1 animate ["map_repos",0.6];
} else {
	100011 cuttext ["","plain"];
	rah1 animate ["map_repos",1];
};
};

//--- Multiple pictures
if (_inputtype == typename []) then {
_count = (count _input - 1);

for "_i" from 0 to _count do {
	_file = _input select _i;
	_layer = 100011 + _i;
	[_file,_layer] call bis_ew_fnc_pip;
};
sleep 1;
_display = uinamespace getvariable "str_pip";
_load = _display displayctrl 100099;
_load ctrlsetfade 1;
_load ctrlcommit 0;
for "_i" from 0 to _count do {
	_layer = 100011 + _count - _i;
	_pip = _display displayctrl _layer;
	_pip ctrlsetfade 1;
	_pip ctrlcommit 0.2;
	sleep 1;
};

[""] call bis_ew_fnc_pip;
};

And here's how it was called in the mission:

sqf = [[
"ca\missions_ew\img\sat_00_12_ca.paa",
"ca\missions_ew\img\sat_00_11_ca.paa",
"ca\missions_ew\img\sat_00_10_ca.paa",
"ca\missions_ew\img\sat_00_09_ca.paa",
"ca\missions_ew\img\sat_00_08_ca.paa",
"ca\missions_ew\img\sat_00_07_ca.paa",
"ca\missions_ew\img\sat_00_06_ca.paa",
"ca\missions_ew\img\sat_00_05_ca.paa",
"ca\missions_ew\img\sat_00_04_ca.paa",
"ca\missions_ew\img\sat_00_03_ca.paa",
"ca\missions_ew\img\sat_00_02_ca.paa",
"ca\missions_ew\img\sat_00_01_ca.paa",
"ca\missions_ew\img\sat_00_00_ca.paa"
]] spawn bis_ew_fnc_pip;

How you would get the position of the actual hits on target, I don't know.

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  

×