View difference between Paste ID: bz7jfYph and Si5Wmtj5
SHOW: | | - or go back to the newest paste.
1-
script METROID_SPEEDBOOSTER ENTER
1+
script METROID_SPEED_BOOSTER ENTER
2
{
3
    int buttons;
4
    while (1)
5
    {
6-
	buttons = GetPlayerInput(-1, INPUT_BUTTONS);
6+
    buttons = GetPlayerInput(-1, INPUT_BUTTONS);
7
    if (CheckInventory("SpeedBoosterAcquired") == 1)
8
    {
9-
        if (buttons & BT_SPEED && buttons & BT_FORWARD)
9+
        if (buttons & (BT_SPEED | BT_FORWARD) == (BT_SPEED | BT_FORWARD))//(buttons & BT_SPEED && buttons & BT_FORWARD)
10
        {
11
            if (CheckInventory("SpeedBoostCounter") == 0) { ActivatorSound("speedboost/start",127); }
12-
            GiveInventory("SpeedBoosterActive",1); 
12+
            GiveInventory("SpeedBoosterPrepare",1);
13
            GiveInventory("SpeedBoosterActive",1);
14
            GiveInventory("SpeedBoostCounter",1);
15
            
16
            if (CheckInventory("SpeedBoostCounter") > 8)
17
            {
18
                ActivatorSound("speedboost/loop",127);
19
                GiveInventory("SpeedBooster",1);
20
                GiveInventory("SpeedBoosterFlashing",1);
21
            }
22
        }
23
	    else
24
	    {
25
            TakeInventory("SpeedBooster",1);
26
            TakeInventory("SpeedBoosterPrepare",1);
27
            TakeInventory("SpeedBoosterActive",1);
28
            TakeInventory("SpeedBoostCounter",0x7FFFFFFF);
29-
29+
30
    }
31
    delay(9);
32
    }
33
}