User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: What is wrong with this?

  1. #1
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,196
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.13%

    What is wrong with this?

    ffc script supermentus
    Code:
    ffc script xoxo
    {
         void run()
         {
    	npc CreateNPC = 58;
    	int Rate = 16;
    	int Weapon = 29;
    	int HP =30;
        }
        void Quit()
       {   
        } // end of void run
    } // end of ffc script
    I read the error code P00 and I don't get it... What is wrong with this script?
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: What is wrong with this?

    ... Well, there are two things there that'll keep it from compiling.
    Code:
    npc CreateNPC = 58;
    58 isn't an NPC, it's a number. If you want an NPC, you'll need to use Screen->LoadFFC().

    Code:
        void Quit()
       {   
        } // end of void run
    That whole block shouldn't be there. If you mean to call Quit() at the end of the script, you'd just put Quit(); inside the body of run(). That isn't necessary, though, since it'll automatically quit at the end of run().

  3. #3
    On top of the world ShadowTiger's Avatar
    Join Date
    Jun 2002
    Location
    Southeastern New York
    Posts
    12,231
    Mentioned
    31 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    29,579
    Level
    46
    vBActivity - Bars
    Lv. Percent
    60.36%
    Achievements It's over 9000!

    Re: What is wrong with this?

    58 isn't an NPC, it's a number. If you want an NPC, you'll need to use Screen->LoadFFC().
    In std.zh, it lists the following:

    const int CF_PUSHRIGHTNS = 58;

    Perhaps that's where this has been derived?

  4. #4
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,196
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.13%

    Re: What is wrong with this?

    How do you load an enemy into the script, then? Thats what I'm aiming to do.


    Woah, nevermind, I figured it out!
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

  5. #5
    On top of the world ShadowTiger's Avatar
    Join Date
    Jun 2002
    Location
    Southeastern New York
    Posts
    12,231
    Mentioned
    31 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    29,579
    Level
    46
    vBActivity - Bars
    Lv. Percent
    60.36%
    Achievements It's over 9000!

    Re: What is wrong with this?

    Whoah, sorry; another question.

    If you want an NPC, you'll need to use Screen->LoadFFC().
    Does this imply that to "create an NPC," it'll function like any enemy would, with its own four-frame animation style for all four directions? Or would it have to be programmed via ZScript to animate for four frames, switching off between four different combos for its frames, for a total of sixteen movement combos alone, etc?

    ...

    I expect a firm and raised-browed "Yes." ._.' .. whooo boy..

  6. #6
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: What is wrong with this?

    You can't create your own, I'm afraid. You can only load pointers to existing enemies (and guys, if I'm not mistaken).
    If you mean enemies created in the upcoming enemy editor... I don't know, really. I imagine at least some of the standard stuff will be handled automatically, but I don't know how it'll all work.

    Edit: Actually, come to think of it, there is Screen->CreateNPC(). That'll only let you create instances of existing enemy types, though.

  7. #7
    Octorok
    Join Date
    Oct 2003
    Location
    Monsteropolis
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,147
    Level
    11
    vBActivity - Bars
    Lv. Percent
    62.09%

    Re: What is wrong with this?

    I think what he was after is something along the lines of:

    Code:
    ffc script supermentus
    {
      void run()
      {
        npc this1 = Screen->CreateNPC(58);
        this1->Rate = 16;
        this1->Weapon = 29;
        this1->HP = 30;
      }
    }
    ... where 58 is supposed to be the constant for one of the Aquamentus types. I think that value and the weapon ID came from b15's std.zh, so it would probably be safer to either import it or just declare the constants yourself before the ffc script.

    Also, you would probably want to set this1->X and this1->Y as well, because CreateNPC probably won't put it where an Aquamentus normally goes. Or you could just put an Aquamentus in the screen as Enemy # and modify it by making that first line "npc this1 = Screen->LoadNPC(#)" (as it sounds like you've already discovered).

    Wow. I don't know what's scarier - the fact that this type of request (save powering up Darknuts) didn't come up sooner, or that Saffith didn't get this one right of the bat!
    Crash Man is the coolest Robot Master ever! Well, aside from Skull Man, Elec Man, Quick Man, Gemini Man, Shadow Man... ahh, forget it!

    Megaman: "Who cares if it's peacetime? You're an inventor, damnit - MAKE SOMETHING!"
    Dr Light: " 'Necessity is the mother of invention.' "
    Megaman: "Good, I'm hungry. Go invent me a sandwich."

  8. #8
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,196
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.13%

    Re: What is wrong with this?

    erm...
    explain to me where "this->" comes from so I don't make this mistake again. Oh and the Aquamentus's location is hardcoded, so there is no need to set a position.

    Secondly, it crashes after the defeat of an enemy. How do I fix it so it doesn't?
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

  9. #9
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,028
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.52%

    Re: What is wrong with this?

    Quote Originally Posted by Master_of_Power View Post
    Secondly, it crashes after the defeat of an enemy. How do I fix it so it doesn't?
    Post it in the bug forum.

  10. #10
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,612
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.92%

    Re: What is wrong with this?

    Creating enemies is pretty bad ass on its own. Gauntlet's enemy generators are now a reality - you can increase the hit points of the fire enemy and have it spit out moblins or something according to a script. Or having a vampire custom boss that flies around and perioidically spits out flocks of bats. Or, better yet, enemies used as projectiles (like ghini 2s for missiles, or bombchus as mines).

    Oh, to be in college again and have endless free time to tinker with these things...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social