ZoriaRPG icon

Level Key Script Set for 2.55

ZoriaRPG | PRO | 03/05/19 01:41:22 PM UTC | 0 ⭐ | 655 👁️ | Never ⏰ | []
C++ |

450 B

|

None

|

0 👍

/

0 👎

//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