Jump to content

Photo

Press "A" to Heal Script.


  • Please log in to reply
10 replies to this topic

#1 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 18 January 2009 - 09:05 PM

Hey guys, I'm requesting a script in which is a like the Signpost Script, but instead of a text box appearing, the "Fairy" flag activates thus healing Link's hearts.

~Thanks!

#2 Aslion

Aslion

    End Fascism

  • Members
  • Real Name:Ryan
  • Location:Plug One's spectacles

Posted 18 January 2009 - 10:11 PM

Shouldn't be too hard, gimme a minute.

CODE
ffc script sign {
  void run(int m) {
    while(true) {
      while(Link->X < this->X - 8 || Link->X > this->X + 24 || Link->Y < this->Y || Link->Y > this->Y + 24 || Link->Dir != DIR_UP || !Link->InputA) {
        Waitframe();
      }
      Link->InputA = false;
      Link->HP = Link->MaxHP; Screen->Message(m);

      while(Link->X >= this->X - 8 && Link->X <= this->X + 24 && Link->Y >= this->Y && Link->Y <= this->Y + 24 && Link->Dir == DIR_UP) {
        Waitframe();
      }
    
      Screen->Message(0);
    }
  }
}


It's just a slight edit of the signpost, that should heal you completely. You can even still have the message if you want.

Edited by Lithium, 18 January 2009 - 10:15 PM.


#3 Christian

Christian

    Summoner

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

Posted 19 January 2009 - 02:56 AM

Wait, let me see if I understood correctly.
you want an ffc script in which when you press "A", The Fairy flag activates which gives the heart animations circle around link and heals him correct?

#4 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 19 January 2009 - 08:49 AM

Exactly

#5 lucas92

lucas92

    Defender

  • Members

Posted 19 January 2009 - 05:07 PM

CODE

import "std.zh"

ffc script InputFairy{
    void run(){
        bool notfairy;
        while(true){
            if(Link->X==this->X&&Link->Y==this->Y+16&&Link->InputA==true&&notfairy==false){
                Waitframe();
                Link->InputA=false;
                Screen->ComboF[ComboAt(Link->X,Link->Y]=CF_FAIRY;
            }
            if(Link->HP==Link->MaxHP)notfairy=true;
                        if(Link->HP<Link->MaxHP)notfairy=false;
            Waitframe();
        }
    }
}
            

Edited by lucas92, 19 January 2009 - 06:44 PM.


#6 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 20 January 2009 - 07:03 AM

QUOTE(lucas92 @ Jan 19 2009, 04:07 PM) View Post

CODE

import "std.zh"

ffc script InputFairy{
    void run(){
        bool notfairy;
        while(true){
            if(Link->X==this->X&&Link->Y==this->Y+16&&Link->InputA==true&&notfairy==false){
                Waitframe();
                Link->InputA=false;
                Screen->ComboF[ComboAt(Link->X,Link->Y]=CF_FAIRY;
            }
            if(Link->HP==Link->MaxHP)notfairy=true;
                        if(Link->HP<Link->MaxHP)notfairy=false;
            Waitframe();
        }
    }
}
            



It doesn't work. All it does is make the FFC act like a Fairy Flag when standing on it.

#7 lucas92

lucas92

    Defender

  • Members

Posted 20 January 2009 - 05:27 PM

I'm not sure in that case what do you want... icon_shrug.gif

I thought you wanted a script that when you press A in front of the FFC it would activate the fairy?

#8 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 20 January 2009 - 06:12 PM

Yeah I did, but it isn't implemented properly. The Fairy flag activates when you are standing on the FFC. It doesn't activate when pressing A in front of it.

Edited by Dawnlight, 20 January 2009 - 06:13 PM.


#9 Christian

Christian

    Summoner

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

Posted 20 January 2009 - 09:55 PM

it probably has something to do with:

CODE
Screen->ComboF[ComboAt(Link->X,Link->Y)]==CF_FAIRY


you're telling the script to have link step on the x and y coordinate to activate the flag.

Edited by Christian, 20 January 2009 - 10:00 PM.


#10 lucas92

lucas92

    Defender

  • Members

Posted 21 January 2009 - 03:35 PM

Well I don't know why it isn't working...

Christian:
CODE

if(Link->X==this->X&&Link->Y==this->Y+16&&Link->InputA==true&&notfairy==false){
                Waitframe();
                Link->InputA=false;
                Screen->ComboF[ComboAt(Link->X,Link->Y]=CF_FAIRY;
            }


CODE
Screen->ComboF[ComboAt(Link->X,Link->Y]=CF_FAIRY;


That one instruction only apply if Link is in front of the ffc and do press A... But it seems that the conditions are ignored. icon_confused.gif

Maybe Joe123 or more advanced scripters than me could get you the code to work. At least I've tried to get the script to work... icon_frown.gif


#11 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 22 January 2009 - 05:21 PM

Good idea, I'll get in touch with them via PM or if they are looking at this thread.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users