No "you" in Collision Event?

Posted By: bodden

No "you" in Collision Event? - 02/02/11 10:21

The Collision-Event, initiated by pXent_setcollisionflag(ent1, ent2, NX_NOTIFY_ON_START_TOUCH) does not work for me correctly. In the event-function I want to find out, which entities clashed, so I wanted to use the "you"-pointer.

To test it, I modified the Plop()-Function/Event in earthball8.c. I added
Code:
function Plop()
{
// Play a ball impact sound.
	ent_playsound(eBlob,sPong,100);
	
	if (you)
	{
		printf("hallo");	
	}
}



==> the "you" is never set. Even if you add a second (PH_STATIC) physik-entity and kick the first one until they clash.

Do I missunderstand something? Where is the mistake?
Posted By: Superku

Re: No "you" in Collision Event? - 02/02/11 20:04

I can confirm your problem, see here:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=349680#Post349680

Still, it hasn't been fixed.
Posted By: bodden

Re: No "you" in Collision Event? - 02/03/11 08:48

Thanks for your answer. Sorry for not have seen this threat bevore, but it's not easy to search in this forum...

Also thanks for the pXent_setbodyflag-hint in your post! Man, if I knew it before it would have saved me a lot of time!
Posted By: Superku

Re: No "you" in Collision Event? - 02/03/11 15:15

You're welcome.

Originally Posted By: JCL
The friction event indeed does not set the you pointer. This will be added.

© 2024 lite-C Forums