Jump to content

Photo

Extending weapons


  • Please log in to reply
4 replies to this topic

#1 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 13 September 2010 - 07:15 PM

I need a simple script that extends weapons. Whether they're Link weapons or enemy weapons, I would appreciate it if I could get scripts for both.

#2 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 22 September 2010 - 09:32 PM

Sorry to bump this, but the primary reason I'm requesting this is because in this test quest file, I have a walking enemy that shoots a rock and happens to use the Extend Enemy FFC script.

#3 Saffith

Saffith

    IPv7 user

  • Members

Posted 05 October 2010 - 02:21 PM

Do you mean you just want to make the weapons bigger?

CODE
ffc script BigEWeapons
{
    void run(int type)
    {
        eweapon wpn;
        while(true)
        {
            for(int i=Screen->NumEWeapons(); i>0; i--)
            {
                wpn=Screen->LoadEWeapon(i);
                if(wpn->Extend==3 || (type>0 && wpn->ID!=type))
                    continue;
                wpn->Extend=3;
                wpn->TileWidth=2;
                wpn->TileHeight=2;
                wpn->HitWidth=32;
                wpn->HitHeight=32;
            }
            Waitframe();
        }
    }
}



Global scripts don't take arguments, so you'll have to fill in the types to extend.
CODE
global script BigLWeapons
{
    void run()
    {
        lweapon wpn;
        while(true)
        {
            for(int i=Screen->NumLWeapons(); i>0; i--)
            {
                wpn=Screen->LoadLWeapon(i);
                if(wpn->Extend==3 || !isBigType(wpn))
                    continue;
                wpn->Extend=3;
                wpn->TileWidth=2;
                wpn->TileHeight=2;
                wpn->HitWidth=32;
                wpn->HitHeight=32;
            }
            Waitframe();
        }
    }
    
    bool isBigType(lweapon wpn)
    {
        // Example: make LW_BRANG and LW_FIRE big
        if(wpn->ID==LW_BRANG)
            return true;
        if(wpn->ID==LW_FIRE)
            return true;
        return false;
    }
}


All right?

#4 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 05 October 2010 - 03:48 PM

O_o I thought there wasn't any hard coded stuff to extend weapons like that?

Maybe I just didn't look well enough at Zscript.txt. D:


#5 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 05 October 2010 - 04:42 PM

For the big EWeapons script, what are the arguments? And how do they work?


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users