Jump to content

Photo

OoT Sword and Shield check


  • Please log in to reply
20 replies to this topic

#16 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 24 November 2008 - 02:39 AM

QUOTE(lucas92 @ Nov 23 2008, 01:32 PM) View Post

Oh... That Solid void seems useful... Can I use it if I give you credits?


That's what it's for. icon_wink.gif

Note: This is just a stripped down version of the one I use for fast moving/large objects in the vertical shooter, so it is sorta untested in the realm of Zelda-type quests.

....actually, do you mind testing it for me?

#17 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 24 November 2008 - 02:49 PM

Does that solid void be used to make other ffc scripts solid? Or ffcs you set on a screen?

#18 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 26 November 2008 - 01:37 AM

Whoa, I don't know what the deal was with that last one. I think that was from the one I never used. Anyway...If you actually tested it you'd of seen that. for shame.. icon_frown.gif

..I kid, I kid.
But seriously, use this for now. I use it in my quest so I know it works. Especially if Mido is going to be a flying battering ram.
I'll do Zelda themed one at a later time.




CODE

void Solid(int x, int y, int width, int height){

    int w = width*16;    int center_x = x+((w/2)-8);
    int h = height*16;    int center_y = y+((h/2)-8);
    int lx = Link->X;    int ly = Link->Y;

    if(ly<y && ly>y-14 && lx>x-12 && lx<x+w-2){
        if(ly>4){
            Link->Y--;
            if(ly>y-12)Link->Y--;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputDown=false;

    }

    else if(ly>y+h-5 && ly<y+h && lx>x-12 && lx<x+w-2){
        if(lx<x+w-4 && lx>x+(w/2)){
            Link->X++;
            Link->InputLeft=false;
        }
        if(ly<155){
            Link->Y++;
            if(ly<y+h-2)Link->Y++;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputUp=false;

    }

    if(lx<x && lx>x-14 && ly>y-12 && ly<y+h-2){
        if(lx>4){
            Link->X--;
            if(lx>x-12)Link->X--;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputRight=false;

    }
    else if(lx>x+w-5 && lx<x+w && ly>y-12 && ly<y+h-2){
        if(lx<x+w-2)Link->X++;
        if(lx<236){
            Link->X++;
            if(lx<x+w-2)Link->X++;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputLeft=false;

    }


    if(lx<x+w-4 && lx>x+4 && ly<y+h-4 && ly>y-4){ // Player is inside the tile!
        if(ly<155 && ly>4){
            if(ly<center_y)Link->Y--;
            else Link->Y++;
        }
        if(lx<236 && lx>4){
            if(lx<center_x)Link->X--;
            else Link->X++;
        }
        Link->HP--;
        Game->PlaySound(19);
    }
}


QUOTE


Does that solid void be used to make other ffc scripts solid? Or ffcs you set on a screen?


Theoretically, any object or combo, real or imaginary, on screen or not, can be targeted. Even enemies can be solid. But as I said, it needs to be tweaked for specific purposes.

Ideally there should be five of them. One for:
-stationary, -moving,- fast moving, -enemies, -projectiles
...but whatever.




#19 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 30 November 2008 - 06:20 AM

The first one crashed zelda classic gleeok ^_^ hmmmm ill try to figure out what's causing the problem. Don't want to bother you anymore, ill try to do something myself this time. Hopefully my first script =p

#20 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 03 December 2008 - 02:45 AM

QUOTE(drzchulo973 @ Nov 30 2008, 03:20 AM) View Post

The first one crashed zelda classic gleeok ^_^ hmmmm ill try to figure out what's causing the problem. Don't want to bother you anymore, ill try to do something myself this time. Hopefully my first script =p



Huh? I just tested it and it worked better than I thought it would. icon_smile.gif

My 1x1 Armos...err...I mean Mido successfully blocked off half the screen so Link could not pass...the bastardo!! D:

you're using this one yes?..:

CODE

ffc script mido{
    void run(int Item, int Xdistance, int m1, int m2){

        int o = this->X;
        int l = o-Xdistance;
        int r = o+Xdistance;
        
        while(true){

            Waitframe();
            Solid(this->X,this->Y,1,1);

            if(Link->Item[Item]){

                if(Abs(Link->X-this->X)<=8 && Link->Y > this->Y
                    && Link->Y < this->Y+18 && Link->InputA){

                    Screen->Message(m2);

                    for(int i=0;i<16;i++){
                        this->X++;Waitframe();Solid(this->X,this->Y,1,1);
                    }
                    for(int i=0;i<16;i++){
                        this->Y++;Waitframe();Solid(this->X,this->Y,1,1);
                    }
                }
            }
            else{

                if(Abs(Link->Y-this->Y)<64){

                    if(Link->X < this->X && l < this->X)this->X--;
                    else if(Link->X > this->X && r > this->X)this->X++;
                }
                else{
                    if(this->X > o)this->X--;
                    else if(this->X < o)this->X++;
                }

                if(Abs(Link->X-this->X)<=8 && Link->Y > this->Y
                    && Link->Y < this->Y+18 && Link->InputA){

                    Screen->Message(m1);
                }
            }
        }
    }
}
void Solid(int x, int y, int width, int height){

    int w = width*16;    int center_x = x+((w/2)-8);
    int h = height*16;    int center_y = y+((h/2)-8);
    int lx = Link->X;    int ly = Link->Y;

    if(ly<y && ly>y-14 && lx>x-12 && lx<x+w-2){
        if(ly>4){
            Link->Y--;
            if(ly>y-12)Link->Y--;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputDown=false;

    }

    else if(ly>y+h-5 && ly<y+h && lx>x-12 && lx<x+w-2){
        if(lx<x+w-4 && lx>x+(w/2)){
            Link->X++;
            Link->InputLeft=false;
        }
        if(ly<155){
            Link->Y++;
            if(ly<y+h-2)Link->Y++;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputUp=false;

    }

    if(lx<x && lx>x-14 && ly>y-12 && ly<y+h-2){
        if(lx>4){
            Link->X--;
            if(lx>x-12)Link->X--;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputRight=false;

    }
    else if(lx>x+w-5 && lx<x+w && ly>y-12 && ly<y+h-2){
        if(lx<x+w-2)Link->X++;
        if(lx<236){
            Link->X++;
            if(lx<x+w-2)Link->X++;
        }
        else{
            Game->PlaySound(19);
            Link->HP--;
        }
        Link->InputLeft=false;

    }
    if(lx<x+w-4 && lx>x+4 && ly<y+h-4 && ly>y-4){ // Player is inside the tile!
        if(ly<155 && ly>4){
            if(ly<center_y)Link->Y--;
            else Link->Y++;
        }
        if(lx<236 && lx>4){
            if(lx<center_x)Link->X--;
            else Link->X++;
        }
        Link->HP--;
        Game->PlaySound(19);
    }
}

Edited by Gleeok, 03 December 2008 - 02:47 AM.


#21 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 03 December 2008 - 03:07 AM

^_^ "bastardo"?

Anyways,icon_smile.gif
I have not yet used that one , I used the first one you ever posted here and it didn't work icon_shrug.gif
But if you tested this one ,and it works for zelda-ish games, then I will use it then. icon_smile.gif

this script has a high potential that, after you have the requiered item and you talk to a guard, the guard will direct link to see the queen.
alas oracle of ages queen ambi icon_smile.gif
But it will require a lot of work.
but it's defitnely possible.
Just an idea I just thought.

By the way, what's the
CODE

Game->PlaySound(19);

For in this script?
Mido talks?
Hehe

Edited by drzchulo973, 03 December 2008 - 03:12 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users