Jump to content

Photo

Real npc script not working.


  • Please log in to reply
17 replies to this topic

#1 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 04:24 AM

I got this script from this page: http://zctut.com/npc.php

This dosen't seem to be working for me. I Just need someone to explain how to set up the arguments better then he dose. Also when i use the script with only the string, it keeps playing the string over and over. icon_confused.gif

Thanks for any help

#2 Joe123

Joe123

    Retired

  • Members

Posted 18 May 2008 - 04:38 AM

Do you have the Quest Rule, 'Messages Dissapear' checked?

#3 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 05:13 AM

Yes, its not that it's staying it's that it's dissappearing and reapearing. until i press b.

#4 Joe123

Joe123

    Retired

  • Members

Posted 18 May 2008 - 05:34 AM

Ah!
I remember this problem.

Would you be alright having 'L' to be 'talk to people' instead of A?

#5 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 05:44 AM

Yeah, i would much rather that. But i'm trying to figure out how to make them turn.

#6 Joe123

Joe123

    Retired

  • Members

Posted 18 May 2008 - 05:58 AM

CODE
ffc script real_npc{
    void run(int m, int s, int f, int def_dir, int d){
        int d_x; int d_y;
        int a_x; int a_y;
        int orig_d = this->Data;
        if(d == 0) d = 48;
        while(true){
            d_x = this->X - Link->X; a_x = Abs(d_x);
            d_y = this->Y - Link->Y; a_y = Abs(d_y);
            if(f != 0){
                if(a_x < d && a_y < d){
                    if(a_x <= a_y){
                        if(d_y >= 0) this->Data = orig_d;
                        else this->Data = orig_d+1;
                    }else{
                        if(d_x >= 0) this->Data = orig_d+2;
                        else this->Data = orig_d+3;
                    }
                }else{this->Data = orig_d + def_dir;}
            }
            if(Link->InputL && a_x < 24 && a_y < 24 && Link->Z == 0){
                if(s != 0) Game->PlaySound(s);
                Link->InputL = false;
                Screen->Message(m);
            }
        Waitframe();
        }
    }
}


That one will work, and will use 'L' to make them talk.

If you want them to turn, set 'D2' to a number that's not 0.

#7 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 06:12 AM

No more string problems icon_smile.gif but still not moving:(

And BTW joe123 do you know where i can find a Roll script? Like Rolling in FSA.

#8 Joe123

Joe123

    Retired

  • Members

Posted 18 May 2008 - 06:15 AM

http://www.armageddo...ead.php?t=98780

Have you set up the combos for the NPC so that they go:
Up,Down,Left,Right
on the combopage?

#9 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 06:28 AM

yeah, still didn't help. What do i set as the combo on the FFC?

#10 Joe123

Joe123

    Retired

  • Members

Posted 18 May 2008 - 06:28 AM

The first of the 4 that you've set up on the tilesheet.

#11 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 06:41 AM

Yeah, still not turing i set them up in that order and did the arguments.

Where can i get link rolling sprites for DOR?

Sorry if i'm getting annoying icon_razz.gif

Yay no longer a newbie. icon_biggrin.gif

Edited by Son, 18 May 2008 - 06:42 AM.


#12 Joe123

Joe123

    Retired

  • Members

Posted 18 May 2008 - 07:11 AM

What do you have D4 set to?

That's distance in pixels (not combos) away from the ffc that Link should be before it starts turning.
If you leave it as 0, it's set to 48 (so 3 combos) by defualt.
That should work.

IPB Image

Don't worry about getting annoying, if I thought it was annoying I wouldn't be responding =P
Sadly I don't have anything better to do than sit around here and poke people's scripts.
Not for another 50 minutes anyway =P


Why aren't you a newbie icon_confused2.gif

Not that you're really nOObish or anything, but why has it changed now? =P

#13 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 07:23 AM

ok i got d0 set to the right string, d1, is set to 1 d2, is set to 1 d3, is set to 16, d4 is set to 2, and the rest is 0.

I set those tiles to the charge sprites right?

I'm not a newbie anymore because i ranked up icon_biggrin.gif

#14 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 18 May 2008 - 07:24 AM

Yo Joe! Could I use your NPC Script? Also, is that all I needed to do to fix my rolling problem?

(If you look in Quest Editor Help, setting the Gravity could've caused some side-effects.)

Edited by AgentLym, 18 May 2008 - 07:26 AM.


#15 Son

Son

    Experienced Forumer

  • Members
  • Real Name:Ben
  • Location:Australia

Posted 18 May 2008 - 07:40 AM

Yays, it works!

i got the rolling working but it looks like hes jsut headbutting


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users