I'm currently using this method:
Code: Select all
Script "P1InputShield" (void)
{
int activateshield;
while (TRUE)
{
activateshield = GetPlayerInput(-1, INPUT_BUTTONS);
if (activateshield & BT_RELOAD)
{
GiveActorInventory(1, "Input_Shield", 1);
delay(4); //3 frame buffer
TakeActorInventory(1, "Input_Shield", 10);
}
delay(1);
}
}
Ideally i want to have the item be given when the button is pressed and taken when the button gets released. (also yes i know i have to change the way that i'm giving the item because it won't work online so don't question that)