Sorry for my late reply
I think I can help you now.
First, make an intiger in the global code like this:
int EggCount = 0;
This will tell the computer to make room for a variable called "EggCount" and set it's value to "0".
Next, figure out how you want to end the level. Sometimes in a puzzle game (which sounds something like what you're making) the level gfx change and the game becomes more difficult. So create a script in the global code like this:
void EndLevel1();
{
//put your script here
}
Finally, open the control panel for the view and click "add", "draw actor", "script editor".
if(EggCount >= 40)
{
EndLevel1();
}
Hope that was helpful