Jump to content

Photo

Deku Leaf script (problem)


  • Please log in to reply
4 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 14 July 2018 - 11:02 PM

hello guys i would like to ask some questions... There's a way that i can get a new version of the Deku Leaf global (item) scripts with a function that the whirlwind can trigget wand triggers flags and also that fix some bugs ? Because when i try to compile (i didn't changes anything) i always got that error "DekuGlide is undecleared" even if i combine it with the combined script. And since that i'm not able to adding new scripts and i used that item script as of the combined scripts. And even if the script working the whirlwind doesn't do anything except that making Link jump highs and uses the leaf to planes and when Link falls in the pits or in the lava there's a bug that Link always returns exactly where he falling for the last time until the whirlwind dissappears. 

Is that this old version of the deku leaf is no longer working anymore ? I do need it for my quest that i didn't working by a long time unformately :/ Especially for making the Sky Tower the "working" dungeon. Without that i will have no choice but making a new dungeon and that's the problem: I do already made so many times to prepares the dungeon in the skyes. I did made so many month to making this dungeon and i can't just making another dungeon to remplaces this one... 



#2 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 15 July 2018 - 06:04 AM

Are you using Mero's deku leaf script?

#3 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 15 July 2018 - 12:39 PM

Just ask Moosh, he used the deku leaf to make his Sky Tower the working dungeon and did not make new dungeon.


  • Shane likes this

#4 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 15 July 2018 - 05:35 PM

well i did trying to asking him before about that but still no responses. And his deku leaf script don't working without his full combined scripts that's the problem. 


That's Moosh's Deku Leaf script.

const int CMB_LINKHOVER = 48;
const int CMB_XAYAHOVER = 716;
const int CMB_LEAFHOVER = 44;
const int SPR_LEAF = 88;
const int FFCS_MAGICLEAF = 1;
const int I_MAGICLEAF = 143;

ffc script DekuLeaf{
	int Dir4(int Dir){
		if(Dir==DIR_LEFTUP||Dir==DIR_RIGHTUP){
			return DIR_UP;
		}
		else if(Dir==DIR_LEFTDOWN||Dir==DIR_RIGHTDOWN){
			return DIR_DOWN;
		}
		else{
			return Dir;
		}
	}
	void run(){
		if(Link->Z>0||Link->Jump>0){
			Link->InputA = false;
			Link->InputB = false;
			Link->Invisible = true;
			int Jump = Link->Jump;
			int Z = Link->Z;
			while(Z>1||Link->Jump>0){
				Link->InputA = false;
				Link->InputB = false;
				if(Link->InputUp&&Link->Y<=2)Link->InputUp = false;
				else if(Link->InputDown&&Link->Y>=158)Link->InputDown = false;
				if(Link->InputLeft&&Link->X<=2)Link->InputLeft = false;
				else if(Link->InputRight&&Link->X>=238)Link->InputRight = false;
				if(XayaActive == true){
					Screen->FastCombo(3, Link->X, Link->Y-Link->Z, CMB_XAYAHOVER+Dir4(Link->Dir), 7, 128);
				} 
				else{
					Screen->FastCombo(3, Link->X, Link->Y-Link->Z, CMB_LINKHOVER+Dir4(Link->Dir), 6, 128);
				}
				Screen->FastCombo(3, Link->X, Link->Y-Link->Z-12, CMB_LEAFHOVER+Dir4(Link->Dir), 8, 128);
				Jump = Max(-0.8, Jump-0.04);
				Z = Max(0, Z+Jump);
				Link->Z = Max(1, Z);
				Link->Jump = 0;
				Waitframe();
			}
			if(Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)]!=CT_PITSCRIPT||OnFFC())Link->Invisible = false;
			Link->Z = 0;
		}
		else if(Link->MP>2){
			Link->MP-=2;
			lweapon Wind = CreateLWeaponAt(LW_FIRE, Link->X+InFrontX(Link->Dir, 4), Link->Y+InFrontY(Link->Dir, 4));
			Wind->UseSprite(13);
			Wind->Angular = false;
			Wind->Dir = Link->Dir;
			Wind->Step = 200;
			Game->PlaySound(SFX_WHIRLWIND);
			RecordSound(Link->X, Link->Y);
			lweapon Leaf = CreateLWeaponAt(LW_SCRIPT1, Link->X+InFrontX(Link->Dir, 4), Link->Y+InFrontY(Link->Dir, 4));
			for(int i=0; i<8; i++){
				if(!Leaf->isValid()){
					Leaf = Screen->CreateLWeapon(LW_SCRIPT1);
				}
				Leaf->X = Link->X+InFrontX(Link->Dir, 4);
				Leaf->Y = Link->Y+InFrontY(Link->Dir, 4);
				Leaf->UseSprite(SPR_LEAF);
				Leaf->CollDetection = false;
				if(Link->Dir==DIR_DOWN){
					Leaf->Flip = 2;
				}
				else if(Link->Dir==DIR_LEFT){
					Leaf->Tile++;
					Leaf->Flip = 1;
				}
				else if(Link->Dir==DIR_RIGHT){
					Leaf->Tile++;
				}
				Link->Action = LA_ATTACKING;
				Waitframe();
			}
			Leaf->DeadState = 0;
		}
	}
}

const int FFCS_WHIRLWIND = 2;

ffc script WhirlWind{
	void run(int JumpHeight){
		while(true){
			if(Distance(Link->X, Link->Y, this->X, this->Y)<12&&Link->Z<=0&&!Link->Invisible){
				Link->Z = 1;
				Game->PlaySound(SFX_JUMP);
				Link->Jump = JumpHeight;
				if(CountFFCsRunning(FFCS_MAGICLEAF)==0&&Link->Item[I_MAGICLEAF]&&(GetEquipmentA()==I_MAGICLEAF||GetEquipmentB()==I_MAGICLEAF)){
					RunFFCScript(FFCS_MAGICLEAF, 0);
				}
			}
			Waitframe();
		}
	}
}

i was thinking that could be works but i was wrong. I don't find the problem since it's required the full combined script of Moosh



#5 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 28 July 2018 - 01:13 PM

I know imitation is a form of admiration, but maybe try not to copy other quests so heavily. Also learning scripting would help you a lot. Glancing over the script I see a check for Xaya, which you probably would wanna remove.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users