#library "XTRALIB"
#include "zcommon.acs"
#libdefine LIGHTAMP_UNIT 100

// Eliminates player input from affecting jetpakkin'.
script "JetpackFreeze" (void){SetPlayerProperty(0,1,PROP_FROZEN);}
script "JetpackUnFreeze" (void){SetPlayerProperty(0,0,PROP_FROZEN);}
// Lightamp toggler script
script "LightampController" (void){
	int amptimer;
	TakeInventory("LightampUpgrade",1);
	while (CheckInventory("PowerLiteAmp")){
		amptimer++;
		if(!(amptimer % LIGHTAMP_UNIT)){ 
			TakeInventory("LightampUpgrade",1);}
		if(!CheckInventory("LightampUpgrade")){
			break;}
		delay(1);}
	TakeInventory("PowerLiteAmp",1);}
// Just in case you sprint into a level transition, let's make sure to end that.
script "sprintfixer" (void){
	takeinventory("SprintingPlayer",1);
	acs_namedexecute("Player-ChangeSpeed",0,100,0,0);}
script "sprintfix_first" ENTER{
	acs_namedexecute("sprintfixer",0,0,0,0);}
script "sprintfix_again" RETURN{
	acs_namedexecute("sprintfixer",0,0,0,0);}

	