Jump to content

Photo

Pegasus boots problem


  • Please log in to reply
6 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 14 January 2018 - 05:51 PM

Hello everyone. I need some help. When i use the Pegasus boots (with the Pegasus Boots script) i don't dash i walking very slow and i have to touch the directions keybord to make him dash and that create a bug when i change a room. plus when i touch the directions keybord Link change a direction when he "dash". There's a way to fix that ? i still can break a specific combo when i dash trough them. 


Edited by Sans, 14 January 2018 - 05:58 PM.


#2 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 15 January 2018 - 09:40 AM

is that the entire global script is broken ? because i did combined the script with another global scripts.

 

Actually i did used this global script (however i did use Mooshpit script) 

https://www.purezc.n...=scripts&id=159


Edited by Sans, 15 January 2018 - 11:29 AM.


#3 justin

justin

    Adept

  • Members

Posted 16 January 2018 - 09:16 AM

The vanilla Pegasus Boots script works when setup properly. If combined with another global you might have to do some stuff to make everything happy.

 

Posting your combined global script would go a long way to solving your problem. 



#4 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 16 January 2018 - 03:29 PM

here's the combined script 

 

global script CursedTreasureScript{
	void run(){
//=======================Bracelets=================
holding_block = 0;
//=================================================

		//======== Mooshpit ========
		MooshPit_Init();
		//==========================

                //========== Bombs ========
                BombsScreenShake();
                //=========================

		//======== Ghost ========
		StartGhostZH();
		//=======================

		//======== Ice Combos ========
		//Setup variables for ice combos.
		Setup_IceCombos();
		//Variable that stores Game->GetCurScreen() the previous frame.
		int oldscreen = Game->GetCurScreen();
		//============================

                //=========Mine Cart==========
		ScrollingDraws_Init();
		Minecart_Init();
                //============================

		while(true){
//=======================Bracelets=================
PowerBracelet();
//=================================================

//=======================DekuLeaf==================

//==================================================

			//======== Mooshpit ========
			MooshPit_Update();
			//==========================

                        //========== bombs =========
                        BombsScreenShake();
                        //==========================

			//======== Deku Leaf ========
			if(Link->Z == 0){
				if(!HitGround) Game->PlaySound(SFX_LAND);
				HitGround = true;
			}
			//Check if Link has the Deku Leaf LTM item.
			if(Link->Item[I_DEKULEAF_LTM]){
				//Increment Glide_Time if it's greater than or equal to 0;
				if(Glide_Time >= 0)  Glide_Time++;
				//Check if DEKU_DRAIN doesn't equal 0.
				if(DEKU_DRAIN != 0){
					//Increment draintimer and wrap it to DEKU_DRAIN. If it equals 0 after all that decrement MP.
					draintimer = (draintimer + 1) % DEKU_DRAIN;
					if(draintimer == 0) Link->MP--;
				}
				//If Glide_Time has reached DEKU_MAX_GLIDE_TIME or MP has reached 0 cancel the gliding by removing the LTM item.
				if(Glide_Time == DEKU_MAX_GLIDE_TIME || Link->MP == 0) Link->Item[I_DEKULEAF_LTM] = false;
				//Otherwise if not scrolling glide down to the ground.
				else if(Link->Action != LA_SCROLLING){
					looptimer = (looptimer + 1) % DEKU_LOOP;
					if(looptimer == 0) Game->PlaySound(SFX_GLIDE);
					DekuGlide();
				}
				//Check if Link just used the DekuLeaf and if so cancel the gliding by removing the LTM item.
				if(UsedItem(I_DEKULEAF) && DEKU_CANCELLABLE) Link->Item[I_DEKULEAF_LTM] = false;
				//Null the A and B buttons to prevent item use.
				Link->InputA = false;
				Link->InputB = false;
                 }
			//===========================

                        //========ScrollDraws=======
			ScrollingDraws_Update();
			Waitdraw(); //Only one of this
			//==========================

			//======== Ghost ========
			UpdateGhostZH2();
			//=======================
			
			//======== Ice Combos ========
			Update_IceCombos(oldscreen);
			oldscreen = Game->GetCurScreen();
			//============================
			
                        //=========Mine Cart===========
  			Minecart_Update();
                        //=============================

                        //=========PegasusBoots==========
                        ScrollFix(); 

                        PegasusBoots();
                        //===============================
			Waitdraw();
			
			Waitframe();
		}
	}
}
	//This function makes it appear that Link is holding the leaf overhead and makes him fall slower.
	void DekuGlide(){
		//Check Link's Z position and if it's less than or equal to 0 cancel the glide by removing the LTM item.
		if(Link->Z <= 0){
			Link_Z = 0;
			Link->Item[I_DEKULEAF_LTM] = 0;
		}
		//Otherwise load the itemdata of the LTM item and use it to draw the leaf on layer 4.
		else{
			itemdata id = Game->LoadItemData(I_DEKULEAF_LTM);
			Screen->FastTile(4, Link->X, Link->Y - Link_Z - 8, (id->InitD[0]*10) + Link->Dir, id->InitD[1], 128);
		}
		//Set Link's Z position to Link_Z and subtract Link_Z by GRAVITY2.
		Link->Z = Link_Z;
		Link_Z -= GRAVITY2;
	}


#5 justin

justin

    Adept

  • Members

Posted 17 January 2018 - 08:48 AM

you had two waitdraws in the global loop. might have been causing the problem. i didn't quite understand your problem, and i didn't test this so report back. with so many complex global scripts running that are all changing Link's position and drawing and stuff you're bound to have bugginess unless you make them all place nice. i don't have the time to look at all the other global scripts and learn them well enough to do this for you.

 

here's the updated version with the extra waitdraw removed, and some stuff shifted around to hopefully fix the problem.

 

global script CursedTreasureScript{
void run(){
  //=======================Bracelets=================
  holding_block = 0;
  //=================================================
 
  //======== Mooshpit ========
  MooshPit_Init();
  //==========================
 
                //========== Bombs ========
                BombsScreenShake();
                //=========================
 
  //======== Ghost ========
  StartGhostZH();
  //=======================
 
  //======== Ice Combos ========
  //Setup variables for ice combos.
  Setup_IceCombos();
  //Variable that stores Game->GetCurScreen() the previous frame.
  int oldscreen = Game->GetCurScreen();
  //============================
                //=========Mine Cart==========
  ScrollingDraws_Init();
  Minecart_Init();
                //============================
 
  while(true){
   //=======================Bracelets=================
   PowerBracelet();
   //=================================================
   //======== Mooshpit ========
   MooshPit_Update();
   //==========================
                        //========== bombs =========
                        BombsScreenShake();
                        //==========================
                        //=========PegasusBoots==========
                        ScrollFix();
 
                        PegasusBoots();
                        //===============================
 
   //======== Deku Leaf ========
   if(Link->Z == 0){
    if(!HitGround) Game->PlaySound(SFX_LAND);
    HitGround = true;
   }
   //Check if Link has the Deku Leaf LTM item.
   if(Link->Item[I_DEKULEAF_LTM]){
    //Increment Glide_Time if it's greater than or equal to 0;
    if(Glide_Time >= 0)  Glide_Time++;
    //Check if DEKU_DRAIN doesn't equal 0.
    if(DEKU_DRAIN != 0){
     //Increment draintimer and wrap it to DEKU_DRAIN. If it equals 0 after all that decrement MP.
     draintimer = (draintimer + 1) % DEKU_DRAIN;
     if(draintimer == 0) Link->MP--;
    }
    //If Glide_Time has reached DEKU_MAX_GLIDE_TIME or MP has reached 0 cancel the gliding by removing the LTM item.
    if(Glide_Time == DEKU_MAX_GLIDE_TIME || Link->MP == 0) Link->Item[I_DEKULEAF_LTM] = false;
    //Otherwise if not scrolling glide down to the ground.
    else if(Link->Action != LA_SCROLLING){
     looptimer = (looptimer + 1) % DEKU_LOOP;
     if(looptimer == 0) Game->PlaySound(SFX_GLIDE);
     DekuGlide();
    }
    //Check if Link just used the DekuLeaf and if so cancel the gliding by removing the LTM item.
    if(UsedItem(I_DEKULEAF) && DEKU_CANCELLABLE) Link->Item[I_DEKULEAF_LTM] = false;
    //Null the A and B buttons to prevent item use.
    Link->InputA = false;
    Link->InputB = false;
                 }
   //===========================
                        //========ScrollDraws=======
   ScrollingDraws_Update();
   Waitdraw(); //Only one of this
   //==========================
 
   //======== Ghost ========
   UpdateGhostZH2();
   //=======================
  
   //======== Ice Combos ========
   Update_IceCombos(oldscreen);
   oldscreen = Game->GetCurScreen();
   //============================
  
                        //=========Mine Cart===========
     Minecart_Update();
                        //=============================
  
   Waitframe();
  }
}
}
//This function makes it appear that Link is holding the leaf overhead and makes him fall slower.
void DekuGlide(){
  //Check Link's Z position and if it's less than or equal to 0 cancel the glide by removing the LTM item.
  if(Link->Z <= 0){
   Link_Z = 0;
   Link->Item[I_DEKULEAF_LTM] = 0;
  }
  //Otherwise load the itemdata of the LTM item and use it to draw the leaf on layer 4.
  else{
   itemdata id = Game->LoadItemData(I_DEKULEAF_LTM);
   Screen->FastTile(4, Link->X, Link->Y - Link_Z - 8, (id->InitD[0]*10) + Link->Dir, id->InitD[1], 128);
  }
  //Set Link's Z position to Link_Z and subtract Link_Z by GRAVITY2.
  Link->Z = Link_Z;
  Link_Z -= GRAVITY2;
}

Edited by justin, 17 January 2018 - 08:52 AM.


#6 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 17 January 2018 - 09:05 AM

Thank you Justin

 

I had also double Waitdraw in the global loop and your reply on this solved my issue very much thanks.

now it works as it should work................


Edited by judasrising, 17 January 2018 - 09:07 AM.


#7 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 17 January 2018 - 10:54 AM

i'll test all that thanks alot.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users