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
==> 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?
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?