ZoriaRPG icon

Automatic Dark Room Candle Item Script

ZoriaRPG | PRO | 09/05/19 11:53:50 AM UTC | 0 ⭐ | 763 👁️ | Never ⏰ | []
C++ |

540 B

|

None

|

0 👍

/

0 👎

//Set to an item's action script, and flag that item as having a passive script.
//Requires the script flag 'Item Scripts Continue to Run'
 
item script autocandleA
{
    int f;
    while(1)
    {
        ++f;
        unless ( ((f%20)) && !Screen->Lit ) Screen->Lit = true; //this could all be a pointless waste of instructions 
                    //trying to reduce how often we write ->Lit. 
        Waitframe();
    }
}
 
item script autocandleB //Lighter ZASM. need to check performance difference against v. A
{
    while(1)
    {
        Screen->Lit = true; 
        Waitframe();
    }
}

Comments