Level Key Script Set for 2.55
//For 2.55
//Places a leve key on any screen at the coordinates of the ffc
ffc script LKey
{
const int ID = 100; //get externally as LKey.ID
void run(int lvl)
{
item i = Screen->CreateItem(ID);
i->X = this-X;
i->Y = this->Y;
i->PScript = Game->GetItemScript("LevelKey");
i->InitD[0] = Clamp(lvl,0,511);
}
}
//Collect script, set automatically by the ffc
item script LevelKey
{
void run(int lvl)
{
++Game->LKeys[lvl];
}
}
Comments