Jump to content

Photo

OOT Wallmasters


  • Please log in to reply
36 replies to this topic

#1 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 13 December 2012 - 08:35 PM

I want it to make a sound when it is about to drop down a shadow for it when it drops and I want the shadow to get bigger as it drops and if it catches link it will bring him back to the dungeon but only when he drops down not when he is walking on the floor then after he is on the floor he can jump back up CAN YOU DO IT.

#2 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 15 December 2012 - 10:01 PM

Lo and behold the Moosh has left hiding to bestow upon the populus a script.
CODE
//Le Autoghost OOT Wallmaster Script
//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.

IPB Image

#3 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 16 December 2012 - 01:10 AM

I get an error

Pass 1: Parsing
Pass 2: Preprocessing
Can't open input file
tmp, line 2: Error P01 : Failure to parse imported file ffcscipt.zh.


#4 Jenny

Jenny

    Hero of Time

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 16 December 2012 - 01:16 AM

This is an autoghost enemy script, you must make sure you have the right files for it in your ZC folder, or it won't compile.

#5 Saffith

Saffith

    IPv7 user

  • Members

Posted 16 December 2012 - 01:39 AM

And you mistyped "ffcscript" as "ffcscipt." Again. Or you didn't fix it from before, more likely.

#6 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 16 December 2012 - 11:25 AM

nope typed "ffcscrip.zh" right and still got the same error my script point out any flaws in it

CODE
import "std.zh"
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 Cereal Guy

Cereal Guy

    Senior

  • Members
  • Location:Concepción, CHL

Posted 16 December 2012 - 11:31 AM

Woah man. Its ffcscript.zh. Are you understand? FFCSCRIPT.ZH >.>

#8 Jenny

Jenny

    Hero of Time

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 16 December 2012 - 11:34 AM

You have to make sure ffcscript.zh is in the same place as ZQ, or it will not compile.




#9 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 16 December 2012 - 11:34 AM

well typed it in like up above compiled and

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 Jenny

Jenny

    Hero of Time

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 16 December 2012 - 11:39 AM

Try putting import "string.zh"

#11 Cereal Guy

Cereal Guy

    Senior

  • Members
  • Location:Concepción, CHL

Posted 16 December 2012 - 11:40 AM

String.zh? Not Std.zh?

#12 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 16 December 2012 - 11:42 AM

YES YES THIS IS DELICIOUS! it worked

#13 Cereal Guy

Cereal Guy

    Senior

  • Members
  • Location:Concepción, CHL

Posted 16 December 2012 - 11:43 AM

Yeah! Finally! Dx

#14 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 16 December 2012 - 11:45 AM

one question what are attributes like on the script I can't find them?

#15 Jenny

Jenny

    Hero of Time

  • Members
  • Real Name:Jennette
  • Pronouns:She / Her

Posted 16 December 2012 - 11:46 AM

Look at Moosh's original post.


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