Jump to content

Photo

SWORD SFX


  • Please log in to reply
43 replies to this topic

#16 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 06 November 2008 - 12:21 PM

How do you make it talk in some screens? Like for example,in the beginning, the fairy says a couple lines like"the great deku tree has summoned you" or other lines that help with puzzles. How do you set that up?

#17 Joe123

Joe123

    Retired

  • Members

Posted 06 November 2008 - 12:39 PM

Put a message string on the screen?

#18 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 06 November 2008 - 04:10 PM

Yea but if you set up the guy on each screen you want the fairy to talk, wouldn't that be kind of annoying to hear the same message each time you enter that same screen?

#19 Elmensajero

Elmensajero

    Doyen(ne)

  • Members
  • Real Name:John
  • Location:Raleigh, North Carolina

Posted 06 November 2008 - 04:42 PM

Something like this? (D0 is id number of the string to play.)

CODE

bool gameintromessage=false;

ffc script playintromessage
{
    void run(int messageid)
    {
        if(!gameintromessage)
        {
            Screen->Message(messageid);
            gameintromessage=true;
        }
    }
}


#20 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 06 November 2008 - 05:43 PM

thanks elmensajero for getting rid of that annoying guy icon_smile.gif

now joe, when i compiled that fairy script, alot of lines became undeclared icon_confused2.gif 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 Elmensajero

Elmensajero

    Doyen(ne)

  • Members
  • Real Name:John
  • Location:Raleigh, North Carolina

Posted 06 November 2008 - 08:42 PM

Try adding the following to the file and see if it works...
CODE

const int FairyMovementMax=30;

Edited by Elmensajero, 06 November 2008 - 08:44 PM.


#22 sigtau

sigtau

    *sip*

  • Members
  • Real Name:Will
  • Location:Spending too much time on this damn thing

Posted 06 November 2008 - 10:33 PM

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.

#23 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 07 November 2008 - 12:29 AM

QUOTE(TheMasterSwordsman @ Nov 6 2008, 10:33 PM) View Post

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 Joe123

Joe123

    Retired

  • Members

Posted 07 November 2008 - 10:34 AM

CODE
bool StringOnce[20];

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 >_<

QUOTE(TheMasterSwordsman @ Nov 7 2008, 03:33 AM) View Post
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.


No problem.
How much do you already know?

#25 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 07 November 2008 - 03:47 PM

CODE
ffc script Climbing{
     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. icon_shrug.gif

Edited by drzchulo973, 07 November 2008 - 04:01 PM.


#26 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 07 November 2008 - 03:47 PM

CODE
ffc script Climbing{
              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. icon_shrug.gif

#27 Joe123

Joe123

    Retired

  • Members

Posted 07 November 2008 - 03:56 PM

Now, that script is possibly the worst script I ever wrote.
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.

CODE
const int F_LADDER            = 98;        // Flag to use for ladders

//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 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 07 November 2008 - 04:27 PM

well I actually have combined global scripts in the past. im guessing everything goes before waitframe(); and edit some brackets. or am I wrong? but this one I think its complicated because of the fairy and such. and because it contains waitdraw(); which I basically don't have a clue of what that is. I probabbly would need you to combine it for me.

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 Joe123

Joe123

    Retired

  • Members

Posted 07 November 2008 - 07:16 PM

CODE
const int F_LADDER            = 98;        // Flag to use for ladders
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 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 07 November 2008 - 08:54 PM

No it doesnt compile. Alot of lines became undeclared. "function combofi is undeclared" variable "stringonce" is undeclared. And the bool combofi global constants saids "unexpected float on token init"


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users