PDA

View Full Version : Button prohibit flag



zcAmazing
05-07-2008, 04:17 PM
I need a simple script. I am trying to make it, but it involves the use of a general purpose script flag and I don't know what function for it.

Here is what I did so far:

ffc script prohibitupdownbtn{
void run(){
while (true){
Link->InputUp = false;
Link->InputDown = false;
Waitframe();
}
}
}
When Link steps on the flag that has that script, it disables particular buttons. The reason I need the script because when combining the Sideview Ladder with the Climbing and the quest is using Diagonal movement, there is a bug in gameplay. When pressing up/left or up/right near the ladder, Link moves down in to the solid and gets compeletely stuck. I want to avoid that bug with the script I am requesting.

Anything I am missing in the script I am trying to make?

Joe123
05-07-2008, 05:56 PM
Well yeah, you might want something to actually reference the flag...


const int flag = 99; //Set the flag you want to use here

ffc script prohibitupdownbtn{
void run(){
while(true){
if(Screen->ComboF[ComboAt(Link->X,Link->Y)] == flag || Screen->ComboI[ComboAt(Link->X,Link->Y)] == flag){
Link->InputUp = false;
Link->InputDown = false;
}
Waitframe();
}
}
}

zcAmazing
05-07-2008, 07:40 PM
Okay, thanks.

I'll see if I can learn from that and how it works.

As of now, lucky 777 posts, but it could be a short while.

zcAmazing
05-09-2008, 04:09 PM
Umm, it works like it should, but the effect of the script is not completely centered on the flag.

The effect is 8 pixels to the right of the flag.

Joe123
05-09-2008, 07:08 PM
const int flag = 99; //Set the flag you want to use here

ffc script prohibitupdownbtn{
void run(){
while(true){
if(Screen->ComboF[ComboAt(Link->X+8,Link->Y+8)] == flag || Screen->ComboI[ComboAt(Link->X+8,Link->Y+8)] == flag){
Link->InputUp = false;
Link->InputDown = false;
}
Waitframe();
}
}
}

zcAmazing
05-15-2008, 04:10 PM
Now I don't actually need it anymore, but it can be useful to anyone (can be edited to make other buttons useless, use it in particular places). Thanks again for the help anyways. :) 1(Even when it is centered on the flag, I can still make Link get stuck on a sideview climbing ladder (scripts attached). I found the best solution, I placed a solid (non-walk) conveyor up combo below the ladder. That way, Link will never get stuck, but vibrate himself. Only applies to diagonal movements.)

Joe123
05-15-2008, 05:07 PM
Heh, no problem.
Took about 2 minutes.