I just need an FFC script that disables the use of the L button for a screen. I tried doing it myself, but seeing as I don't really know how to script, it didn't work.
Disabling 'L'
Started by
Joe123
, Sep 19 2007 01:51 PM
5 replies to this topic
#1
Posted 19 September 2007 - 01:51 PM
#2
Posted 19 September 2007 - 01:56 PM
That's way too easy.
That SHOULD work. If not, take out the () in InputL.
CODE
import "std.zh"
ffc script stop_L
void run()
{
Link->InputL()=false;
waitframe();
}
ffc script stop_L
void run()
{
Link->InputL()=false;
waitframe();
}
That SHOULD work. If not, take out the () in InputL.
#3
Posted 19 September 2007 - 02:08 PM
The idea was that it was easy, I just want to be able to turn off the roll script in a certain room. It was so easy, I even tried it myself . Ah well.
You missed the brace to open the script.
However, when I try to compile it, it says I have an undeclared waitframe
EDIT: apparently that's because it needed a capital letter to start. However, it does nothing when I try it.
CODE
ffc script stop_L{
void run()
{
Link->InputL = false;
Waitframe();
}
}
void run()
{
Link->InputL = false;
Waitframe();
}
}
You missed the brace to open the script.
However, when I try to compile it, it says I have an undeclared waitframe
EDIT: apparently that's because it needed a capital letter to start. However, it does nothing when I try it.
Edited by Joe123, 19 September 2007 - 02:11 PM.
#4
Posted 19 September 2007 - 03:21 PM
The idea was that it was easy, I just want to be able to turn off the roll script in a certain room. It was so easy, I even tried it myself . Ah well.
CODE
ffc script stop_L{
void run()
{
Link->InputL = false;
Waitframe();
}
}
void run()
{
Link->InputL = false;
Waitframe();
}
}
You missed the brace to open the script.
However, when I try to compile it, it says I have an undeclared waitframe
EDIT: apparently that's because it needed a capital letter to start. However, it does nothing when I try it.
Oops. My bad. To tell you the truth, I haven't done any ZScripting lately. XD Also, it SHOULD stop the effects of pressing "L". Doing InputL = false; should tell it that L isn't being pressed. O_o.
...Oh wait! I've got it now! It only runs once.
CODE
ffc script stop_L
{
void run()
{
while(true)
{
Link->InputL = false;
Waitframe();
}
}
}
{
void run()
{
while(true)
{
Link->InputL = false;
Waitframe();
}
}
}
When you do "while(true)", the script keeps looping as long as you keep it running. Stop it with Quit();, and it won't loop again. Nice trick, huh?
#5
Posted 19 September 2007 - 04:12 PM
Thankyou, works fine now
When I tried to script it, it was the same as your first one. Then I tried to use a while loop, and realised I didn't really know how to, and so it didn't work very well.
This makes the Roll script by Beefster a LOT more useable.
When I tried to script it, it was the same as your first one. Then I tried to use a while loop, and realised I didn't really know how to, and so it didn't work very well.
This makes the Roll script by Beefster a LOT more useable.
Edited by Joe123, 19 September 2007 - 04:14 PM.
#6
Posted 19 September 2007 - 05:32 PM
Thankyou, works fine now
When I tried to script it, it was the same as your first one. Then I tried to use a while loop, and realised I didn't really know how to, and so it didn't work very well.
This makes the Roll script by Beefster a LOT more useable.
Heh, you're welcome. Half the time, the reason a script doesn't work even though it looks perfectly okay is that it quits right after it goes through it once. Remember, people! while(true) is your friend for looping a script as long as it's active!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users