Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

LTTP Wistle

4 replies · 2,667 views · Started 08 December 2008

import "std.zh"
/////////////LTTP Wistle Script Constants//////
const int BirdDataRight=23718;
const int BirdDataLeft=23720;
const int LinkOcarinaData=23801;
const int LinkShadow=632;
int warpx;
int warpy;
bool wistle;
bool bird1;
bool bird2;
bool bird4;

void ScreenIsWavy(int numframes)
{
while(numframes>0)
{
Screen->Wavy=50;
numframes-=numframes;
Waitframe();
}
}
ffc script WistleWorldSelection
{
void run(int maxworlds)
{
int cursor;
while(true)
{
Link->InputStart=false;
if(Link->InputUp)
{
Game->PlaySound(64);
Link->InputUp=false;
Waitframe();
cursor-=1;
}
if(Link->InputDown)
{
Game->PlaySound(64);
Link->InputDown=false;
Waitframe();
cursor+=1;
}
if(cursor<0)cursor=0;
if(cursor>maxworlds)cursor=maxworlds;
if(cursor==0)this->Y=0;
if(cursor==1)this->Y=48;
if(Link->InputA)
{
Link->InputA=false;
Waitframe();
if(cursor==0)
{
bird4=true;
warpx=40;
warpy=112;
Link->Warp(0,66);
Quit();
}
if(cursor==1)
{
bird4=true;
warpx=120;
warpy=112;
Link->Warp(3,81);
Quit();
}
}
Waitframe();
}
}
}

ffc script LinkIsFrozen
{
void run()
{
while(true)
{
Link->Action=3;
Waitframe();
}
}
}
item script LTTP_Wistle_Action
{
void run()
{
wistle=true;
}
}

global script slot2
{
void run()
{
int birdy;
int birdx;
int rate;
int shadowy;
int ratex;
int ratey;
int realratex;
int realratey;
bool IsTaken;
while(true)
{
int x=Link->X;int y=Link->Y;
int currentScreen=Game->GetCurScreen();
int currentDScreen=Game->GetCurDMapScreen();
int currentMap=Game->GetCurMap();
int currentDmap=Game->GetCurDMap();
////////////LTTP Wistle Script//////////
if(wistle)
{
Game->PlaySound(33);
int i;
while(i<40)
{
Link->Action=LA_DROWNING;
Screen->DrawCombo(3,x,y, LinkOcarinaData, 1, 1,6, 1, 0, 0, 0,0, 0, true, 128);
i++;
Waitframe();
}
Link->Action=3;
wistle=false;
bird1=true;
}
if(bird1)
{
birdy=y-16;
while(birdx<=Link->X)
{
Screen->DrawTile(1,birdx, birdy+16,LinkShadow, 1, 1,7, 1,0, 0, 0,0, true, 64);
Screen->DrawCombo(3,birdx,birdy,BirdDataRight,1, 1,7, 1, 0, 0, 0,0, 0, true, 128);
birdx+=2;
Waitframe();
}
Link->Action=LA_NONE;
bird1=false;
bird2=true;
}
if(bird2)
{
birdx=Link->X;birdy=Link->Y-16;
IsTaken=true;
rate=1;
shadowy=Link->Y;
while(IsTaken)
{
Link->Action=LA_HOLD1LAND;
birdx+=2;
birdy+=rate*-2;
Screen->DrawCombo(3,birdx,birdy,BirdDataRight,1, 1,7, 1, 0, 0, 0,0, 0, true, 128);
Screen->DrawTile(1,birdx, shadowy,LinkShadow, 1, 1,7, 1,0, 0, 0,0, true, 64);
Link->X=birdx;Link->Y=birdy+16;
if (birdx>=232||birdy<=0)IsTaken=false;
Waitframe();
}
bird2=false;
ScreenIsWavy(120);
Link->Warp(4,7);
}
if(bird4)
{
ScreenIsWavy(120);
birdx=warpx;
birdy=warpy;
shadowy=warpy+16;
Link->Action=0;
while(bird4)
{
birdx-=2;
Screen->DrawCombo(3,birdx,birdy,BirdDataLeft,1, 1,7, 1, 0, 0, 0,0, 1, true, 128);
Screen->DrawTile(1,birdx, shadowy,LinkShadow, 1, 1,7, 1,0, 0, 0,0, true, 64);
if(birdx<0)bird4=false;
Waitframe();
}
}
//////////END//////////////
Waitframe();
}
}
}

Also, it was all included with the file...

And I'm not even sure if it is a Zscript problem... It seems like a bug to me.

Well, that is a very nice script. And, it's not the problem.

The town uses the "Active Subscreen (Dungeon Map)" subscreen, while the forest uses "Active Subscreen (Triforce)". The triforce subscreen is not set up properly, and the whistle is not connected to anything! So, as soon as ZC tries to update it, it goes "bzuh", and kicks it off the menu.

I modified the triforce subscreen so the whistle had proper settings, and suddenly, it worked again. The settings I used:

Position: 4, Up Select: 0, Down Select: 0, Left Select: 3, Right Select: 5

And, it worked like a charm!

(side note: you have some under-combo issues in the forest you may want to take a look at)