OOT Wallmasters
#1
Posted 13 December 2012 - 08:35 PM
#2
Posted 15 December 2012 - 10:01 PM
//Attribute 1: Pause in 60ths of a second while the enemy is in the air
//Attribute 2: Pause in 60ths of a second while the enemy is on the ground
//Attribute 11: Combo to use for the ghosted enemy
//Attribute 12: Slot number this script is loaded in
//Set the enemy's step speed to change the speed at which it rises back into the air
//Don't use on screens with like likes
ffc script OOTWallmaster{
void run(int enemyid){
bool caught=false;
npc ghost=Ghost_InitAutoGhost(this, enemyid, GHF_KNOCKBACK|GHF_STUN|GHF_CLOCK);
int combo=ghost->Attributes[10];
int pause1=ghost->Attributes[0];
int pause2=ghost->Attributes[1];
int step=100;
if(ghost->Step>0)step=ghost->Step;
Ghost_Transform(this, ghost, combo, ghost->CSet, 1, 1);
ghost->OriginalTile=GH_BLANK_TILE;
this->Flags[FFCF_OVERLAY]=true;
while(true){
Ghost_X=-32;
Ghost_Y=-32;
Ghost_Waitframes(this, ghost, true, true, pause1);
Ghost_X=Link->X;
Ghost_Y=Link->Y;
Ghost_Z=256;
Game->PlaySound(SFX_FALL);
ghost->CollDetection=true;
while(Ghost_Z>5){
Ghost_Waitframe(this, ghost, true, true);
}
if(Link->Z==0&&!caught&&Distance(Ghost_X, Ghost_Y, Link->X, Link->Y)<=10&&Link->Action!=LA_FROZEN&&Link->Action!=LA_INWIND){
caught=true;
ghost->CollDetection=false;
}
for(int i=0; i<=pause2; i++){
if(caught){
Link->X=Ghost_X;
Link->Y=Ghost_Y;
NoAction();
}
Ghost_Waitframe(this, ghost, true, true);
}
ghost->CollDetection=false;
while(Ghost_Z<256){
if(caught){
NoAction();
Link->X=Ghost_X;
Link->Y=Ghost_Y;
Link->Z=Ghost_Z;
Link->Jump=0;
}
Ghost_Z+=step/100;
Ghost_Jump=0;
Ghost_Waitframe(this, ghost, true, true);
}
if(caught){
Link->Z=0;
Link->Warp(Game->LastEntranceDMap, Game->LastEntranceScreen);
}
}
}
}
And now back to hiding.
#3
Posted 16 December 2012 - 01:10 AM
Pass 1: Parsing
Pass 2: Preprocessing
Can't open input file
tmp, line 2: Error P01 : Failure to parse imported file ffcscipt.zh.
#4
Posted 16 December 2012 - 01:16 AM
#5
Posted 16 December 2012 - 01:39 AM
#6
Posted 16 December 2012 - 11:25 AM
import "ffcscript.zh"
import "ghost.zh"
ffc script OOTWallmaster{
void run(int enemyid){
bool caught=false;
npc ghost=Ghost_InitAutoGhost(this, enemyid, GHF_KNOCKBACK|GHF_STUN|GHF_CLOCK);
int combo=ghost->Attributes[10];
int pause1=ghost->Attributes[0];
int pause2=ghost->Attributes[1];
int step=100;
if(ghost->Step>0)step=ghost->Step;
Ghost_Transform(this, ghost, combo, ghost->CSet, 1, 1);
ghost->OriginalTile=GH_BLANK_TILE;
this->Flags[FFCF_OVERLAY]=true;
while(true){
Ghost_X=-32;
Ghost_Y=-32;
Ghost_Waitframes(this, ghost, true, true, pause1);
Ghost_X=Link->X;
Ghost_Y=Link->Y;
Ghost_Z=256;
Game->PlaySound(SFX_FALL);
ghost->CollDetection=true;
while(Ghost_Z>5){
Ghost_Waitframe(this, ghost, true, true);
}
if(Link->Z==0&&!caught&&Distance(Ghost_X, Ghost_Y, Link->X, Link->Y)<=10&&Link->Action!=LA_FROZEN&&Link->Action!=LA_INWIND){
caught=true;
ghost->CollDetection=false;
}
for(int i=0; i<=pause2; i++){
if(caught){
Link->X=Ghost_X;
Link->Y=Ghost_Y;
NoAction();
}
Ghost_Waitframe(this, ghost, true, true);
}
ghost->CollDetection=false;
while(Ghost_Z<256){
if(caught){
NoAction();
Link->X=Ghost_X;
Link->Y=Ghost_Y;
Link->Z=Ghost_Z;
Link->Jump=0;
}
Ghost_Z+=step/100;
Ghost_Jump=0;
Ghost_Waitframe(this, ghost, true, true);
}
if(caught){
Link->Z=0;
Link->Warp(Game->LastEntranceDMap, Game->LastEntranceScreen);
}
}
}
}
Edited by Da Masta Sord, 16 December 2012 - 11:33 AM.
#7
Posted 16 December 2012 - 11:31 AM
#8
Posted 16 December 2012 - 11:34 AM
#9
Posted 16 December 2012 - 11:34 AM
Pass 1: Parsing
Pass 2: Preprocessing
Pass 3: Building symbol tables
ghost.zh, line 395: Error S10: Function printf is undeclared.
ghost.zh, line 396: Error S10: Function printf is undeclared.
ghost.zh, line 397: Error S10: Function printf is undeclared.
ghost.zh, line 1943: Error S10: Function printf is undeclared.
ghost.zh, line 1944: Error S10: Function printf is undeclared.
ghost.zh, line 1945: Error S10: Function printf is undeclared.
#10
Posted 16 December 2012 - 11:39 AM
#11
Posted 16 December 2012 - 11:40 AM
#12
Posted 16 December 2012 - 11:42 AM
#13
Posted 16 December 2012 - 11:43 AM
#14
Posted 16 December 2012 - 11:45 AM
#15
Posted 16 December 2012 - 11:46 AM
Also, yes Cereal Guy, both std.zh and string.zh are needed for scripts such as this.
Edited by Dragonite, 16 December 2012 - 11:49 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users