void die()
{
CreateTimer("view", "stop", 12);
CreateTimer("Life_count", "stop", 12);
DestroyActor("player");
lives-=1;
if ( lives < 0 )
{
GameOver();
return;
}
Life_count.textNumber -=1;
DestroyActor("Event Actor");
CreateTimer("view", "viewmove", 10);
}
MoveTo("view", -160.000000, -120.000000, viewscrollspeed, "player", "");
if ( view.x == -160 & view.y == -120 )
{
DestroyTimer("viewmove");
playertransparency=1;
CreateActor("player", "playerup", "(none)", "(none)", 0, 0, true);
ChangeTransparency("player", 1.000000);
CreateTimer("player", "playerfadein", 50);
}
if ( playertransparency > 0 )
{
playertransparency -= 0.02;
ChangeTransparency("player", playertransparency);
}
else
{
DestroyTimer("playerfadein");
}
if ( playertransparency > 0 )
{
playertransparency -= 0.02;
ChangeTransparency("player", playertransparency);
}
else
{
DestroyTimer("playerfadein");
EventEnable("player", EVENTKEYDOWN);
EventEnable("player", EVENTKEYUP);
}
Users browsing this forum: No registered users and 1 guest