Jump to content

Photo

Cutscene script request


  • Please log in to reply
90 replies to this topic

#16 Evile

Evile

    Dolphinslayer

  • Members

Posted 28 April 2008 - 11:58 PM

You don't need a script to do this at all. this whole scene could be done in 1.92 b183... All you need is some combo cycling, some warps on the ground and some duplicate screens. It should work perfectly this way, and you don't need any scripts.

#17 Joe123

Joe123

    Retired

  • Members

Posted 29 April 2008 - 01:46 AM

It looks so clunky if you do it like that though.
Scripts are much smoother.

And you also don't need any duplicate screens, which is nice.

EDIT: Well, you might want one, but back in 2.10 you'd be using 10 or something.

Edited by Joe123, 29 April 2008 - 01:47 AM.


#18 Fox

Fox

    Will the Hero rise again?

  • Members
  • Real Name:Scott
  • Location:Southern California

Posted 29 April 2008 - 03:43 AM

While things might not "need" scripts, scripts generally will be the better way to do things from here on out. Most of the time, they require far less effort to achieve the same effect. In this case, either the animation would have looked sloppy and disjointed, or the scene would have taken much longer to build. When I used to work with ZC, I wanted everything to look extremely polished. This meant that animating a person walking across half a screen took ages, as I had to edit each scene a pixel at a time.

If I ever get back into ZC, which may happen when a full version is released (ha), I'll be using scripts extensively in any project I work on. They're easier to work with, more time-efficient, easier to read than 60 identical screens, and far more versatile.

ZebraStallion, I imagine you're going to want more scripting help for your quest. I recommend taking Joe's advice, and either learning the language yourself or getting a dedicated scripter for your quest (though I highly recommend you try the former suggestion).

#19 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 29 April 2008 - 03:06 PM

QUOTE(Master Maniac @ Apr 28 2008, 10:46 PM) View Post

ah its no problem. its good practice and a good thing for me to do for now. plus i feel like helping out.

so you dont want the fairy to fly off the edge of the screen? i could do that...

and i seem to have hit a roadblock. it seems my script doesent want to work. i think i did something wrong though.

also, make sure the Item with an ID # of 255 isnt being used for anything. thats the dummy item that makes the cutscene only play through once. if that item is being used, then could you tell me another item youre not using? (i need the ID # and it can be a blank item. the item im giving is particularly useless except in cutscenes like this.)

item #255 is fine.

#20 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 06:19 PM

oh, zebra stallion!!! i have nearly finished your script!!! =) it took a while, but this should work.

CODE
//=============//
//Elzo cutscene//
//=============//

//reproduction of the "elzo being attacked" scene from Minish Cap

//=====//
//SETUP//
//=====//

//you will need 5 ffc's and 8 combos total.you will need 2 message strings. you will need 3 identical screens.
//ffc 1 is an NPC (fairy, person, animal, whatever)
//ffc 2 and 3 are octorocks
//ffc 4 is the rock they spit.

//in each ffc's setup, set their coordinates in a straight line along the x-axis.
//all of theit x coordinates need to be the same.
//then, set the rock a few units to the right of the octo you placed on the left.

//the combo setup on the combo page:

//the fairy and the rock are nothing special. set them up how you want.
//however there should be 2 graphics for each octorock.
//1 will be an octorock just standing there. the other will be placed 2 combos ahead on the combo page,
//and should be the octo preparing to spit a rock.
//the other 2 should be sensitive warps with blank graphics. warps A and B.

//you will need 3 identical screens for this.
//1st screen: place all ffc's here.
//when link walks toward the scene to help the fairy (or whatever you want to put there),
//it will warp him to the second screen. (tile warp B)

//2nd screen: the FFC octos are replaced by real octos here.
//you get to set where they spawn. (there is a flag for that)
//there needs to be a fiary FFC here, also. when all the enemies are killed, the screen warps to the 3rd screen.
//this screen MUST be enclosed, or link will be able to leave at will during the battle, so
//edit the tiles at the entrance to the screen to block him off.

//3rd screen: nothing here, and the design is the same as the 1st screen.
//3rd screen should have no enemies on it and the side warps to the next areas and the previous area that link came from.

//=========//
//placement//
//=========//

//place the first script on the fairy FFC on the first screen
//and the second on the fairy on the second screen

//=========//
//ARGUMENTS//
//=========//

//*1st script*//

//D0=the message string to play. ("help me!!" or something to that effect.)
//D1=the combo that is tilewarp A. remember, this tile should have a blank graphic. (A should warp him directly to the 3rd screen)
//D2=the combo that is tilewarp B (B should warp you to the second screen)
//D3=number of tiles link must walk into the screen to start the battle.(not pixels, tiles)

//*Second script*//

//D0= message string to play. ("thank you" or something to that effect)
//D1= combo that you made that has a tile warp on it. sends link to the 3rd screen.

import "std.zh"

ffc script elzo_cutscene{
  void run(int s,int c1,int c2,int tiles){

    int t = 0;

     while(t<=4) {

       if(Link->Item[255]){
         int combo = Screen->ComboT[ComboAt(Link->X,Link->Y)];
         Screen->ComboT[ComboAt(Link->X,Link->Y)] = c1;
         Waitframes(3);
         Screen->ComboT[ComboAt(Link->X,Link->Y)] = combo;
         t++;
       }
       else{

         ffc octo1=Screen->LoadFFC(2);
         ffc octo2=Screen->LoadFFC(3);
         ffc rock=Screen->LoadFFC(4);
         ffc fairy=Screen->LoadFFC(1);

         if(rock->X==(fairy->X+4)||rock->X==fairy->X+3){
           rock->X=octo2->X;
           octo2->Data+=2;
           rock->Vx*=-1;
           t+=1;
         }

         if(rock->X==(fairy->X+12)||rock->X==fairy->X+13){

           rock->X=octo1->X;
           octo1->Data+=2;
           rock->Vx*=-1;
           t++;
         }

         if(t<4){
           Link->InputLeft=false;
           Link->InputRight=false;
           Link->InputUp=false;
           Link->InputDown=false;
           Link->InputB=false;
         }

         if(t==4){
           Screen->Message(s);
           rock->Vx = 0;
           rock->X = 0;
           rock->Data = 0;
         }

    //======================================================================================================================//
    //this is where you will edit where link will enter the screen from. i will explain at the point where you need to edit.//
    //**********************************************************************************************************************//


//here. the next line is what to edit. if link enters from the right, leave it be. if he is entering  from the left, chenge the "<" to ">"
//if he enters from the top or bottom, change the "X" to "Y" (make sure it's capital) and if he enters from the top, change the "<" to ">"
//remember, when counting tiles for the variable "tiles, count either from left to right, or from top to bottom. not from the nearest edge of the screen.

         if(Link->X <= (tiles * 16) ){   //<-edit this.
           int combo2 = Screen->ComboT[ComboAt(Link->X,Link->Y)];
           Screen->ComboT[ComboAt(Link->X,Link->Y)] = c2;
           Waitframes(3);
           Screen->ComboT[ComboAt(Link->X,Link->Y)] = combo2;
           Link->Item[255]=true;
           octo1->Data = 0;
           octo2->Data = 0;
         }
       }
       Waitframe();
     }
   }
}
ffc script message_after_kill{
    void run(int s, int c1){

        if(Screen->NumNPCs()==0){

            Screen->Message(s);
            
            int combo = Screen->ComboT[ComboAt(Link->X,Link->Y)];
            Screen->ComboT[ComboAt(Link->X,Link->Y)] = c1;
            Waitframes(3);
            Screen->ComboT[ComboAt(Link->X,Link->Y)] = combo;                        

            }
        }
    Waitframe();
    }
}


now, remember, there is a part inside of the script that you will have to edit, pretaining to which side link enters from. be sure to find it. therer is a lot of setup involved here, though. and actually, if you do not want to make 3 screens, then i can edit this a little more and make it a one-screen scene. but this should work.

also remember, these go on two seperate screens. there are two scripts here, so be ready for some setup ok?

#21 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 06 May 2008 - 07:10 PM

icon_biggrin.gif Thank you so much for your trouble! I added you to the credits list in my quest. Man, I am going to try this out right away. Thanks! icon_thumbsup.gif

#22 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 07:15 PM

well, it isn't exactly finished yet... i don't know what you want the fairy to do at the end. right now, if you set up the screens perfectly, as i have asked, then the fairy will just kind of... pop and be gone lol. i could make it fly off the screen if you want?

#23 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 06 May 2008 - 07:34 PM

Naw, I need the fairy to just disappear. No effects. I am going to use the fairy script after the last screen. And line 825 doesn't compile by the way, this is the message I got:

CODE
PASS 1: PARSING
LINE 825: SYNTAX ERROR, UNEXPECTED IDENTIFYER, E
XPECTING RBRACE, ON TOKEN WAITFRAME
FATAL ERROR P00: CAN'T OPEN OR PARSE INPUT FILE!


Do you know what's wrong?



#24 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 07:37 PM

oh, yeah... the scripts need to be loaded seperately, for some odd reason. so you can either:

1- save them to two different files, or

2-go to the buffer and erase one, compile it, then do the same to compile the other

EDIT: nevermiond, i got the wrong things in my head. just erase that waitframe and everything should work fine.

Edited by Master Maniac, 06 May 2008 - 07:38 PM.


#25 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 06 May 2008 - 07:39 PM

But the scripts don't work when you compile them as 2 different files. icon_confused2.gif

#26 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 07:40 PM

they should ...?

but at any rate, what i said was wrong. you just need to erase that waitframe in line 825

#27 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 06 May 2008 - 07:43 PM

Now line 826 doesn't work...

#28 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 08:01 PM

ugh... hold on.

ok just erase one of the "}" from that script. it appears i got my scope wrong.

#29 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 06 May 2008 - 08:06 PM

Any one? Okay. I'll edit this post if there is a problem.

edit: okay! It compiled!

Edited by ZebraStallion, 06 May 2008 - 08:07 PM.


#30 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 08:09 PM

you can tell me if there's anything you want me to change, too. it should be a quick-fix.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users