According to the manual, hit.blue/green/red IS from the second skin.
Or do I misunderstand the question?

(note, you arent checking a hit was made before changing values in your example)

[EDIT] you posted while I was typing.
But according the the manual blah, blah, again.

ANOTHER way would be to...(untested code)
Code:
function get_ambient()
{
	c_trace(my.x,vector(my.x,my.y,(my.z - 500)),IGNORE_ME|IGNORE_PASSABLE|IGNORE_SPRITES|SCAN_TEXTURE);
	my.ambient = -55;
	/////
	var fmt, pxl;  COLOR tmpC;
	fmt = bmap_lock(hit.skin2,0);
	pxl = pixel_for_bmap(hit.skin2,hit.u1,hit.v1);
	bmap_unlock(hit.skin2);
	pixel_to_vec(tmpC, NULL, fmt, pxl);
	/////	
	my.ambient = my.ambient + ((tmpC.red + tmpC.green + tmpC.blue) / 3);
}
//



Last edited by EvilSOB; 07/11/09 13:16.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial