Edit:
Found a solution by myself. It's not perfect, but it'll do. ^^
Heyho
I have a problem with the GBshield script.
With this script, Link holds his shield while holding the R-button.
To make sure, he dowsn't draw the shield on some specific combos, there is this part of the script:
bool nowalkshield(int underlink){ underlink = ComboAt(Link->X, Link->Y + 8); return (Screen->ComboT[underlink] == 31) || (Screen->ComboT[underlink] == 32) || (Screen->ComboT[underlink] == 33) || (Screen->ComboT[underlink] == 34) || (Screen->ComboT[underlink] == 120) || (Screen->ComboT[underlink] == 121) || (Screen->ComboT[underlink] == 122) || (Screen->ComboT[underlink] == 19) || (Screen->ComboT[underlink] == 89) || (Screen->ComboT[underlink] == 90) || (Screen->ComboT[underlink] == 91) || (Screen->ComboT[underlink] == 6) || (Screen->ComboT[underlink] == 18) || (Screen->ComboT[underlink] == 86) || (Screen->ComboT[underlink] == 87) || (Screen->ComboT[underlink] == 88) || (Screen->ComboT[underlink] == 38) || (Screen->ComboT[underlink] == 36) || (Screen->ComboT[underlink] == 39) || (Screen->ComboT[underlink] == 40) || (Screen->ComboT[underlink] == 37) || (Screen->ComboT[underlink] == 3); }
Now I have a problem with using the shield near a watercombo.
When the watercombo on the right side or under Link, he can use the shield while swimming (if his position is on the correct pixel).
When the watercombo on the left side or above Link, he can't use the shield while standing on land (wich is a big problem for fighting my water-boss).
Does anybody know, how to fix that?
Here is the whole GBshield-script of my script file:
//Input Constants GBShield const int GBS_SMALL=93; const int GBS_MAGIC=8; const int GBS_MIRROR=37; const int GBS_FAKESMALL=156; const int GBS_FAKEMAGIC=157; const int GBS_FAKEMIRROR=158; const int SFX_GBSHIELD=91; global script Slot_2{ void run(){ //for GBShield bool shieldon; int lastdir; int gbsound; while(true){ //Call GBShield function if( (!(Link->Action==LA_ATTACKING)) && (!(Link->Action==LA_CHARGING)) && (!(Link->Action==LA_SPINNING))) {lastdir=Link->Dir;} //used for strafing int nw = ComboAt(Link->X + 8, Link->Y + 12); if(nowalkshield(nw)){ Link->Item[GBS_MIRROR]=false; Link->Item[GBS_MAGIC]=false; Link->Item[GBS_SMALL]=false; shieldon=false; } else if(Link->InputR && !shieldon &&!Link->Invisible&&Screen->D[4]!=10){ //Enable shield when R is pressed shieldon=true; gbsound=SFX_GBSHIELD; if(Link->Item[GBS_FAKEMIRROR]) Link->Item[GBS_MIRROR]=true; else if(Link->Item[GBS_FAKEMAGIC]) Link->Item[GBS_MAGIC]=true; else if(Link->Item[GBS_FAKESMALL]) Link->Item[GBS_SMALL]=true; else{ gbsound=0; shieldon=false; } if(gbsound>0) Game->PlaySound(SFX_GBSHIELD); } else if(!Link->InputR && shieldon){ //Remove shield when R is released Link->Item[GBS_MIRROR]=false; Link->Item[GBS_MAGIC]=false; Link->Item[GBS_SMALL]=false; shieldon=false; } //check if the hookshot is on screen bool nohookshotonscreen = true; for(int i=1;i<=Screen->NumLWeapons();i++){ lweapon testedlw = Screen->LoadLWeapon(i); if(testedlw->ID == LW_HOOKSHOT){nohookshotonscreen=false;} } Waitdraw(); //GBShield //Strafe while R is held down if(Link->InputR && shieldon && (!(Link->Action==LA_ATTACKING)) && (!(Link->Action==LA_CHARGING)) && (!(Link->Action==LA_SPINNING)) && nohookshotonscreen) {Link->Dir=lastdir;} //Turn off inputs "L" and "R". Link->InputL=false; Link->InputR=false; Waitframe(); } //end while(true) } //end voidrun } //end script //GBShield functions bool nowalkshield(int underlink){ underlink = ComboAt(Link->X, Link->Y + 8); return (Screen->ComboT[underlink] == 31) || (Screen->ComboT[underlink] == 32) || (Screen->ComboT[underlink] == 33) || (Screen->ComboT[underlink] == 34) || (Screen->ComboT[underlink] == 120) || (Screen->ComboT[underlink] == 121) || (Screen->ComboT[underlink] == 122) || (Screen->ComboT[underlink] == 19) || (Screen->ComboT[underlink] == 89) || (Screen->ComboT[underlink] == 90) || (Screen->ComboT[underlink] == 91) || (Screen->ComboT[underlink] == 6) || (Screen->ComboT[underlink] == 18) || (Screen->ComboT[underlink] == 86) || (Screen->ComboT[underlink] == 87) || (Screen->ComboT[underlink] == 88) || (Screen->ComboT[underlink] == 38) || (Screen->ComboT[underlink] == 36) || (Screen->ComboT[underlink] == 39) || (Screen->ComboT[underlink] == 40) || (Screen->ComboT[underlink] == 37) || (Screen->ComboT[underlink] == 3); }
Edited by Rastael, 09 June 2017 - 07:41 AM.