Jump to content

Photo

Magical Shield


  • Please log in to reply
9 replies to this topic

#1 Moonbread

Moonbread

    Playing With Psychos

  • Members
  • Pronouns:They / Them

Posted 10 October 2007 - 07:41 PM

Well, I had an idea... but it requires a script icon_razz.gif Simple as that. See, in Remnants, I don't want you to be able to buy a Magical Shield unless you have a small shield. So, is there a way to do a script like that?

#2 Joe123

Joe123

    Retired

  • Members

Posted 11 October 2007 - 02:03 AM

I could script that quite easily, but it would requite a two screen shop where you had pitwarp combos in the first screen that warp you only if you have the small shield. Is that what you want?

#3 Moonbread

Moonbread

    Playing With Psychos

  • Members
  • Pronouns:They / Them

Posted 11 October 2007 - 07:50 AM

Whatever works. icon_razz.gif

#4 Joe123

Joe123

    Retired

  • Members

Posted 11 October 2007 - 12:43 PM

CODE

ffc script shield{
    void run(int a, int b, int c, int d, int e, int f, int g, int h){
        while(true){
            if(Link->Item[93]){
            Screen->ComboT[ComboAt(a,b) && ComboAt(c,d) && ComboAt(e,f) && ComboAt(g,h)] = 41;
            }
        Waitframe();
        }
    }
}


This should work, however I haven't tested it. Just import it and stick it on an FFC on the screen.

What it'll do is check whether Link has the small shield, then when he does, change up to four combos to be direct warp type. You set the X&Y coordinates of those pitwarps via the arguments in the FFC, ie; direct warp one at (argument 0, argument 1), direct warp two at (argument 2, argument 3) etc. If you just leave 0's, it'll change the the combo in the top left so that should'nt be a problem.

If you get a compiling error or it doesn't work or whatever tell me and I'll check it and fix it.

Edited by Joe123, 11 October 2007 - 12:44 PM.


#5 Praethus

Praethus

    Lord of the Darkness

  • Members
  • Real Name:Eddie

Posted 11 October 2007 - 04:35 PM

The easier way would be to just set the FFC's x and y equal to Link's x and y. Then, there would be less arguments and no chance of Link being able to avoid it.

#6 Joe123

Joe123

    Retired

  • Members

Posted 11 October 2007 - 04:58 PM

>_<
Direct Autowarp. It's interesting how I didn't think of that really; I've been using it myself plenty recently. Ah well.

CODE
ffc script shield{
    void run(){
        while(true){
            if(Link->Item[93]){
            this->Data=(94);
            }
        Waitframe();
        }
    }
}


Ok, so just set the screen's A warp to warp you to the duplicate screen, and check the 'direct autowarp' screen flag.

#7 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

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

Posted 12 October 2007 - 02:35 AM

QUOTE(Joe123 @ Oct 11 2007, 03:58 PM) View Post

>_<
Direct Autowarp. It's interesting how I didn't think of that really; I've been using it myself plenty recently. Ah well.

CODE
ffc script shield{
    void run(){
        while(true){
            if(Link->Item[93]){
            this->Data=(94);
            }
        Waitframe();
        }
    }
}


Ok, so just set the screen's A warp to warp you to the duplicate screen, and check the 'direct autowarp' screen flag.



You should make them variables so more people can use the script. Good for infinite upgradable shops too.

CODE

//DO- the item neccesarry
//D1- the dir_warp combo

ffc script shield{
    void run(int item_num, int combo_change){
        while(true){
            if(Link->Item[item_num]){
             this->Data=(combo_change);
            this->X = Link->X; this->Y = Link->Y;
            }
        Waitframe();
        }
    }
}

Edited by Gleeok, 12 October 2007 - 02:36 AM.


#8 Joe123

Joe123

    Retired

  • Members

Posted 12 October 2007 - 10:32 AM

I know I could've made them variables, but it's easier to set up like that.

#9 NoeL

NoeL

    Legend

  • Members
  • Real Name:Jerram

Posted 12 October 2007 - 11:27 AM

^ but bad practice.

#10 Joe123

Joe123

    Retired

  • Members

Posted 12 October 2007 - 06:09 PM

Why is it bad practise?
I was perfectly capable of setting them to be variables, but I thought it would be easier for Moonwhisper to set up in his game if I didn't.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users