#
# Collision event handler for water cup
#

Object	obj = getThisObject();
Object	other = getOtherObject();

if (other == getHero())
{
	float	a = 0.0;
	int	x = getObjectXPosition(obj) + 16;
	int	y = getObjectYPosition(obj) + 16;
	while (a < 360.0)
	{
		createParticleObject(makeCode("par4"), x, y, a, 8.0, 70);
		a = a + 10.0;
	}

	destroyObject(obj);
	
	destroyObjectsOf(makeCode("fwal"));
}

