Cutscene script request
#16
Posted 28 April 2008 - 11:58 PM
#17
Posted 29 April 2008 - 01:46 AM
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
Posted 29 April 2008 - 03:43 AM
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
Posted 29 April 2008 - 03:06 PM
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
Posted 06 May 2008 - 06:19 PM
//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
Posted 06 May 2008 - 07:10 PM
#22
Posted 06 May 2008 - 07:15 PM
#23
Posted 06 May 2008 - 07:34 PM
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
Posted 06 May 2008 - 07:37 PM
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
Posted 06 May 2008 - 07:39 PM
#26
Posted 06 May 2008 - 07:40 PM
but at any rate, what i said was wrong. you just need to erase that waitframe in line 825
#27
Posted 06 May 2008 - 07:43 PM
#28
Posted 06 May 2008 - 08:01 PM
ok just erase one of the "}" from that script. it appears i got my scope wrong.
#29
Posted 06 May 2008 - 08:06 PM
edit: okay! It compiled!
Edited by ZebraStallion, 06 May 2008 - 08:07 PM.
#30
Posted 06 May 2008 - 08:09 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users