SWORD SFX
#16
Posted 06 November 2008 - 12:21 PM
#17
Posted 06 November 2008 - 12:39 PM
#18
Posted 06 November 2008 - 04:10 PM
#19
Posted 06 November 2008 - 04:42 PM
bool gameintromessage=false;
ffc script playintromessage
{
void run(int messageid)
{
if(!gameintromessage)
{
Screen->Message(messageid);
gameintromessage=true;
}
}
}
#20
Posted 06 November 2008 - 05:43 PM
now joe, when i compiled that fairy script, alot of lines became undeclared wait edit: i copy and pasted it again. The only line undeclared is where its saids"fairymovementmax"
Edited by drzchulo973, 06 November 2008 - 07:33 PM.
#21
Posted 06 November 2008 - 08:42 PM
const int FairyMovementMax=30;
Edited by Elmensajero, 06 November 2008 - 08:44 PM.
#22
Posted 06 November 2008 - 10:33 PM
#23
Posted 07 November 2008 - 12:29 AM
Joe123, mind if I use that fairy script to have Navi fly behind Link in my game? If that's the right script, I'll just need help setting it up. I am a total newbie to ZScript.
your making an oot remake 2? Oh and the script compiled correctly. Oh and joe that climbing script you made at agn, doesnt seem to work. Beta 887
Edited by drzchulo973, 07 November 2008 - 03:07 AM.
#24
Posted 07 November 2008 - 10:34 AM
ffc script OnetimeString{
void run(int m, int perm, int dly){
Waitframes(dly);
if(!StringOnce[perm]) Screen->Message(m);
StringOnce[perm] = true;
}
}
This one allows for you to use the same script more than once.
What it does is:
Plays message D0 on the screen after D2 frames that will only appear once.
You have to set D1 to be a different number on each script.
So an example set up would be:
Screen 1
D0: 12
D1: 0
D2: 5
Screen 2
D0: 24
D1: 1
D2: 0
Screen 3
D0: 34
D1: 2
D2: 60
On the first screen, the script will play string 12 after 5 frames.
On the second screen, the script will play string 24 the moment you enter the screen.
On the third screen, the script will play string 34 after 1 second (there are 60 frames in a second).
You have to number D1 one more every time you use the script.
Which climbing script are you using, and in what way does it not work?
Can you post the one you're using here?
I made about 5 different version of that script or something in the end >_<
No problem.
How much do you already know?
#25
Posted 07 November 2008 - 03:47 PM
void run(int btrtx, int btrty, int dummy){
while(true){
if ((Link->X>=this->X) && (Link->y>=this->y) && (link->X<=btrtx) && (Link->y<=btrty)){
if(!Link->Item[dummy]){ Link->Item[dummy] = true;}
Link->InputA=False;
Link->InputB=False;
Link->InputL=False;
Link->InputR=False;
}else{
if(link->Item[dummy]){ Link->Item[dummy] = false;}
}
Waitframe();
}
}
}
there that is the climbing script I found over at AGN. now, im supposing you wrote this script way back in the older betas right?
everything compiles fine.but when I set that up correctly, the entire screen becomes slow motion and the script does not work by giving it the dummy item. instead, it just becomes a combotype "slow walk" since the way it works on the screens and on the new betas. beta 887.
both of them doesn't work. this one , and another one called "Climbing2" I found at the AGN forums.
its maybe because the new betas keep adding new features to Zscript.
Edited by drzchulo973, 07 November 2008 - 04:01 PM.
#26
Posted 07 November 2008 - 03:47 PM
void run(int btrtx int btrty int dummy){
while(true){
if ((Link->X>=this->X) && (Link->y>=this->y) && (link->X<=btrtx) && (Link->y<=btrty)){
if(!Link->Item[dummy]){ Link->Item[dummy] = true;}
Link->InputA=False;
Link->InputB=False;
Link->InputL=False;
Link->InputR=False;
}else{
if(link->Item[dummy]){ Link->Item[dummy] = false;}
}
Waitframe();
}
}
}
there that is the climbing script I found over at AGN. now, im supposing you wrote this script way back in the older betas right?
everything compiles fine.but when I set that up correctly, the entire screen becomes slow motion and the script does not work by giving it the dummy item. instead, it just becomes a combotype "slow walk" since the way it works on the screens and on the new betas. beta 887.
both of them doesn't work. this one , and another one called "Climbing2" I found at the AGN forums.
its maybe because the new betas keep adding new features to Zscript.
#27
Posted 07 November 2008 - 03:56 PM
If you took the time to read down the thread, you'd see a much better script I posted recently at the bottom.
And that script has nothing to do with slow walk combos.
//Checks for both placed and inherent flags on a location, to reduce checks
bool ComboFI(int x,int y,int combotype){
if(Screen->ComboF[ComboAt(x,y)] == combotype
|| Screen->ComboI[ComboAt(x,y)] == combotype) return true;
}
global script Slot_2{
void run(){
while(true){
//other global functions go here...
//other global functions end here.
Climbing(true);
Waitdraw();
Climbing(false);
Waitframe();
}
}
//Climbing functions
void Climbing(bool before){
if(before){
if(OnLadder()){
Link->InputA = false;
Link->InputB = false;
Link->InputL = false;
}
}else{
if(OnLadder()) Link->Dir = 0;
}
}
//Check whether Link is on a ladder combo
bool OnLadder(){
if(ComboFI(Link->X+8,Link->Y+8,F_LADDER) && Link->Z == 0) return true;
}
}
This script is what you want.
It turns all flag 98's (or you can change the flag at the top if you want) in the game into ladders.
All you have to do is set it as your global script.
Now, the problem with that is that you're only allowed one global script, which means you're gonna have to combine two together.
I can do that if you want, or I can show you how to.
Or you could surprise me and figuire it out for yourself!
#28
Posted 07 November 2008 - 04:27 PM
only global scripts active right now are the fairy and now the climbing script .as I may know how to combine the gameboy shield global script. so yeah ,I need the fairy and the climbing script combined please. =)
#29
Posted 07 November 2008 - 07:16 PM
const int CMB_FAIRY = 0; // Set here the first of the 4 Fairy combos, in the order Up, Down, Left, Right
bool HasFairy = true;
bool FairyInit = true;
int FairyMovementCounter;
int FairyMovementMax = 30;
int ScreenNumber;
//Checks for both placed and inherent flags on a location, to reduce checks
bool ComboFI(int x,int y,int combotype){
if(Screen->ComboF[ComboAt(x,y)] == combotype
|| Screen->ComboI[ComboAt(x,y)] == combotype) return true;
}
global script Slot_2{
void run(){
while(true){
//Call Fairy functions
if(HasFairy) Fairy(ScreenNumber);
//Other global functions go here
//Call the climbing functions
Climbing(true);
//Any utility functions go here
ScreenNumber = Game->GetCurScreen();
Waitdraw();
//Call the climbing functions
Climbing(false);
Waitframe();
}
}
//Fairy functions
void Fairy(int ScreenNumber){
ffc Fairy = Screen->LoadFFC(32);
bool ChangeDir;
if(FairyInit){
Fairy->Flags[0] = true;
Fairy->Flags[3] = true;
Fairy->Data = CMB_FAIRY+1;
FairyInit = false;
Fairy->X = Rand(28) + Link->X-16;
Fairy->Y = Rand(28) + Link->Y-16;
}
if(ScreenNumber != Game->GetCurScreen()){
Fairy->X = Rand(28) + Link->X-16;
Fairy->Y = Rand(28) + Link->Y-16;
}
if(FairyMovementCounter == FairyMovementMax){
Fairy->Vx = (Rand(5)/10+0.4)*(Rand(2)*2-1);
Fairy->Vy = (Rand(5)/10+0.4)*(Rand(2)*2-1);
ChangeDir = true;
FairyMovementCounter = 0;
}
if(Distance(Fairy->X,Fairy->Y,Link->X,Link->Y) > 32){
if(Fairy->X < Link->X) Fairy->Vx = (Rand(5)/10+1);
else Fairy->Vx = -(Rand(5)/10+1);
if(Fairy->Y < Link->Y) Fairy->Vy = (Rand(5)/10+1);
else Fairy->Vy = -(Rand(5)/10+1);
ChangeDir = true;
}
if(ChangeDir){
if(Fairy->Vy < 0 && (Abs(Fairy->Vx) < 0.6)) Fairy->Data = CMB_FAIRY;
else if(Fairy->Vy > 0 && (Abs(Fairy->Vx) < 0.6)) Fairy->Data = CMB_FAIRY+1;
else if(Fairy->Vx < 0) Fairy->Data = CMB_FAIRY+2;
else if(Fairy->Vx > 0) Fairy->Data = CMB_FAIRY+3;
ChangeDir = false;
}
FairyMovementCounter++;
}
//Climbing functions
void Climbing(bool before){
if(before){
if(OnLadder()){
Link->InputA = false;
Link->InputB = false;
Link->InputL = false;
}
}else{
if(OnLadder()) Link->Dir = 0;
}
}
//Check whether Link is on a ladder combo
bool OnLadder(){
if(ComboFI(Link->X+8,Link->Y+8,F_LADDER) && Link->Z == 0) return true;
}
}
#30
Posted 07 November 2008 - 08:54 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users