Jump to content

Photo

A script request thread


  • Please log in to reply
51 replies to this topic

#1 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 10 February 2008 - 11:45 PM

Well I need a script that lets you select which boots link will wear, like in Oot. And also sink boots, I dont think there is any sink boot yet. So pretty much boots selectable via L or R. I was kinda inspired by this thread http://www.purezc.co...mp;#entry482231 which made me think if I was able to select sink boots while swimming (in the scenario of the other thread) I could stand instead of swim and use items! Thus making it seem like link is swimming under water then fighting under water.


Oh And to be able to switch boots while swimming (might need to script with it also screen data rule "disable selectable boots")



#2 Joe123

Joe123

    Retired

  • Members

Posted 11 February 2008 - 04:54 AM

So what you want is:
A script which slows Link's walking speed, changes his tiles so his is swimming and dis-ables his items when he is certain areas (those underwater ones).
Then, when he presses 'L' (or R), he equips the boots, and can then walk and therefore use items?

Scripting screen data is impossible...

But screen specific situations aren't, so don't worry.

#3 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 11 February 2008 - 01:30 PM

So could you script that for me then?

#4 Joe123

Joe123

    Retired

  • Members

Posted 11 February 2008 - 01:32 PM

I should think so, yes.
It sounds like quite a simple, but quite a fun script.

How would you have the engine detect whether Link should be swimming or not though?
Could be via a combotype or a flag or something?

#5 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 11 February 2008 - 01:56 PM

I guess combotype like swim able combos because I am going to make it were he can only swim under water. And on top water raft or if there is a boot script out there. So swim able combos

#6 Joe123

Joe123

    Retired

  • Members

Posted 11 February 2008 - 02:11 PM

OK, I'll have a look at it over the next couple of days.

What combotypes do you have spare?
Centre Stature or something?

#7 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 11 February 2008 - 02:16 PM

Im not sure what Centre Stature is, or what combotypes I have to spare. icon_shrug.gif

Edited by ennonfenom, 11 February 2008 - 02:16 PM.


#8 Joe123

Joe123

    Retired

  • Members

Posted 11 February 2008 - 02:19 PM

Centre Statue is a pretty obsoleted combotype, it activates when you put 'statues shoot fire' on in the room.

And there are a few combotypes that aren't really too functional, such as the 3 statue ones and a couple of others.
Have a look down the list, and pick a passive combo-type that you can afford to spare; for each screen that you use the script on, you won't be able to use that combotype.

#9 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 11 February 2008 - 02:21 PM

Yeah I just went and looked I guess any of the statue combotypes

#10 Joe123

Joe123

    Retired

  • Members

Posted 11 February 2008 - 02:22 PM

Ah ok, well check back in a couple of days then and I'll see what I can do =)

#11 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 11 February 2008 - 02:29 PM

alrighty then, thanks!

#12 Joe123

Joe123

    Retired

  • Members

Posted 11 February 2008 - 06:10 PM

CODE
ffc script deepwater{
    void run(){
    int x; int y; int loc;
    bool bootson; int btimer;
    int framedelay;
    int speed = 1;

    int cmbtype = 35; // 35 is centre statue, change it to something else if you want.
    int boots = 0; // set here the item ID number of your boots item
    int s = 0; // set here the SFX ID that you want to play when Link equips the boots.
    int swimLTM = 0; // set here the item ID number of the LTM item that makes link look like he's swimming
        while(true){
            x = Link->X+8; y = Link->Y+8;
            loc = ComboAt(x,y);
            if(Link->InputL && Link->Item[boots] && btimer == 0){
                Game->PlaySound(s);
                bootson = !bootson;
                btimer = 20;
            }

            if(Screen->ComboT[loc] == cmbtype){
                if(!bootson){
                    Link->InputA = false;
                    Link->InputB = false;
                    if(!Link->Item[swimLTM]) Link->Item[swimLTM] = true;
                    speed = 2;
                }else{
                    if(Link->Item[swimLTM]) Link->Item[swimLTM] = false;
                    speed = 1;
                }

                if(Link->Action != LA_FROZEN && Link->Action != LA_ATTACKING){
                    if(Link->InputLeft && Link->Dir == 2){
                        if(framedelay == speed){Link->X = Link->X+1; framedelay = 0;}
                        else framedelay++;
                    }
                    if(Link->InputRight && Link->Dir == 3){
                        if(framedelay == speed){Link->X = Link->X-1; framedelay = 0;}
                        else framedelay++;
                    }
                    if(Link->InputUp && Link->Dir == 0){
                        if(framedelay == speed){Link->Y = Link->Y+1; framedelay = 0;}
                        else framedelay++;
                    }
                    if(Link->InputDown && Link->Dir == 1){
                        if(framedelay == speed){Link->Y = Link->Y-1; framedelay = 0;}
                        else framedelay++;
                    }
                }
            }

        if(btimer > 0) btimer --;
        Waitframe();
        }
    }
}


Looks like I had a bit more free time than I'd anticipated.
Have a go with that and tell me what you think, I haven't actually tested to see if it works, but I have compiled it.

You'll need to set the noted (//) integers at the top, make your water combos into walkable 'Centre Statue' combos, and set this script on an ffc on the screen.

#13 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 11 February 2008 - 11:54 PM

Ok thanks I will check it out later and let you know how it goes.

#14 EnnonFenom

EnnonFenom

    Why, must I clean out Old Lady Simmon's Cave?

  • Banned
  • Real Name:Eric Dethel

Posted 13 February 2008 - 05:15 PM

Ok Joe I got it to compile, and I got the item in my subscreen but when I press L it just switches items set to B. I think the problem is:
CODE
int cmbtype = 35; // 35 is "centre" statue,
I think it should be center statue because that is actually the only thing close to "centre" in my combo list, I am going to try and edit that and see what happens, I will let you know!


Edit: nope still the same, so what now?

Edited by ennonfenom, 13 February 2008 - 05:20 PM.


#15 Joe123

Joe123

    Retired

  • Members

Posted 14 February 2008 - 07:47 AM

QUOTE
I think it should be center statue because that is actually the only thing close to "centre" in my combo list, I am going to try and edit that and see what happens, I will let you know!


Centre is the British spelling.

And what you have to do is make all of the tiles that Link will walk on underwater into centre statue combotypes.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users