Item -> Cutscene
#1
Posted 21 November 2007 - 01:59 AM
#2
Posted 21 November 2007 - 03:06 AM
void run(int itm, int map, int scr){
Waitframes(5);
if(Link->item[itm]){Link->Warp(map,scr);}
}
}
D0 - Item ID
D1 - Dmap
D2 - Screen. Screens are counted across the top from 0 to 15, then on the next row from 16 to 31 etc.
If you want anything more specific, you'll have to be a bit more clear.
What that script does as of the moment is check once when Link first enters a screen whether he has said item (well, it waits for 5 frames first because if it doesn't you can get some interested bug). If you want any other action on it, just ask.
Edited by Joe123, 21 November 2007 - 03:06 AM.
#3
Posted 21 November 2007 - 10:25 PM
#4
Posted 21 November 2007 - 11:34 PM
#5
Posted 22 November 2007 - 12:12 AM
import "std.zh"
void run (int dmap, int scr){
Link->Warp(dmap,scr);
}
}
Compile this item script, and put it in the script slot in the pick up tab of the item. Then go to the augments, and make D0 the dmap Link is warped to, and D1 the screen on the dmap he is warped to. Tell me if it doesn't work.
#6
Posted 22 November 2007 - 03:12 AM
And although that script will warp Link when he gets the item, it won't warp him when he gets the item, then goes to the correct room.
ffc script itemwarp{
void run(int itm, int map, int scr){
Waitframes(5);
if(Link->item[itm] = true){Link->PitWarp(map,scr);}
}
}
Try that Ebola. If it doesn't compile, can you tell me what the error message is?
Edited by Joe123, 22 November 2007 - 03:12 AM.
#7
Posted 22 November 2007 - 01:14 PM
Russ? why did you put Import std.zh within the script?
And although that script will warp Link when he gets the item, it won't warp him when he gets the item, then goes to the correct room.
ffc script itemwarp{
void run(int itm, int map, int scr){
Waitframes(5);
if(Link->item[itm] = true){Link->PitWarp(map,scr);}
}
}
Try that Ebola. If it doesn't compile, can you tell me what the error message is?
I am not very good at scripting, so that is why import std.zh is inside the script. What exactly do you mean by it won't warp him when he gets the item, then go to the correct room? And your script is a freeform combo script. Wouldn't it be easier to attach it to the pickup script of an item so it activates when he gets the item, rather then having a ffc check to see if Link has the item, then warping him?
#8
Posted 22 November 2007 - 02:51 PM
I'd personally prefer to do it with the ffc script anyway, I prefer them to item scripts, but that's up to Ebola.
#9
Posted 22 November 2007 - 04:29 PM
PASS 2: SYNTAX ERROR, UNEXPECTED IMPORT, ON TOKEN IMPORT
FATAL ERROR P00: CAN'T OPEN OR PARSE INPUT FILE!
And Joe123's produced this error:
LINE 6: SYNTAX ERROR, UNEXPECTED ITEM, EXPECTING IDENTIFIER, ON TOKEN ITEM
FATAL ERROR P00: CAN'T OPEN OR PARSE INPUT FILE!
What gives? Just to make sure I'm doing this right, here's what I did to attempt to import both scripts:
- I copied all text and pasted it into Notepad. I then saved it as Item Script.z.
- In ZQuest, I opened Tools -> Scripts -> Compile ZScript...
- I clicked Import and loaded the Item Script.z file.
- I then clicked Compile! and the error messages above were produced.
#10
Posted 22 November 2007 - 04:48 PM
item script warper{
void run (int dmap, int scr){
Link->Warp(dmap,scr);
}
}
This one should work. Follow same directions I gave before. Attach to pickup tab of item, set D0 to be the dmap, and D1 to be the screen Link is warped to.
#11
Posted 22 November 2007 - 06:05 PM
#12
Posted 22 November 2007 - 07:03 PM
ffc script itemwarp{
void run(int itm, int map, int scr){
Waitframes(5);
if(Link->item[itm] == true){Link->PitWarp(map,scr);}
}
}
Hhaha! well look who's the pot calling the stoner green....or something. Here we go.
And Russ, what's the point in taking out the item part? You can already instantaniously warp without a script in the beta's.
#13
Posted 22 November 2007 - 08:09 PM
#14
Posted 23 November 2007 - 12:52 AM
Alright, that works. But when I warp, it doesn't display a string... defeating the purpose of said script. Is there any way to fix this?
Wait, you just want it to display a string when you pick up the item. Joe123 posted a script that does that. Here it is.
void run(int str){
Screen->Message(str);
}
}
Just put it in the pickup tab's script slot and set D0 to be the string to display.
#15
Posted 23 November 2007 - 02:09 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users