Hallo erstmal,
ich versuche grade ein Terrain an ein unebenes anzupassen
also die z.position jedes vertices wo der alpha wert(einer externen bitmap) über 10 liegt soll genauso groß + den rot wert(der externen bitmap)(Terrains sind beide 500 * 500 und die textur 512*512)
Code:
function setStreets(ENTITY*E1, ENTITY*E2, BMAP* H)
{
	CONTACT*c1;
	CONTACT*c2;
	COLOR* hight;
	var hightCheck;
	var translations=0;
	var xrow;
	var yrow;
	var sat = sqrt(ent_status(E1,1));
	bmap_lock(H,0);
	while(xrow < sat)
	{
		xrow+=1;
		while(yrow < sat)
		{
			yrow+=1;
			c1=ent_getvertex(E1,NULL,translations);
			hight = pixel_to_vec(hight,hightCheck,8888,translations/500*512);
			if(hightCheck >= 10)
			{
				c2=ent_getvertex(E2,NULL,translations);
				c1.v.y = c2.v.y+hight.red;
				ent_setvertex(E1,c1,translations);
			}
			translations += 1;
		}
		yrow = 0;
	}
	c_updatehull(E1,0);
	bmap_unlock(H);
}


1. egal was ich mache es wird keine position gesetzt egal was ich mache.
2. Ich habe höchst wahrscheinlich im BMAP*/COLOR* einen fehler!
Hoffe ihr findet den fehler!
xxxxxxx

Last edited by xxxxxxx; 03/04/11 14:52.

Es ist immer wieder erstaunlich, dass Leute die riesen Scripte schreiben die einfachsten sachen nicht können zb. mich mit SIEBEN x zu schreiben! tongue