so here is a script i made for house doors, kind of like MC. there is a small delay in the time it takes for the door to open.
D0 is the combo to use for a door that link would walk through going upward
D1 same as D0, but to the right
D2 to the left
D3 downward
^all combos in the arguments should be closed door tiles
the combos that are used for the closed doors cycle one combo to the right, turning them to open doors.
ffc script house_door{
void run(int c1, int c2, int c3, int c4);
if(ComboAt(Link->X, (Link->Y-16))==c1 && Link->InputUp==true){//for an upward door
Waitframes(5);
ComboD[c1]++;
}
if(ComboAt(Link->X+16), Link->Y)==c2 && Link->InputRight==true){//to the right
Waitframes(5);
ComboD[c2]++;
}
if(ComboAt(Link->X, (Link->Y-16))==c3 && Link->InputDown==true){//down
Waitframes(5);
ComboD[c3]++;
}
if(ComboAt((Link->X-16), Link->Y)==c4 && Link->InputLeft==true{//left
Waitframes(5);
ComboD[c4]++;
}
}
}
i haven't tested it yet, so i am not sure how the ComboD[]++ parts will work...
Edited by Master Maniac, 15 May 2008 - 10:30 AM.