Jump to content

Photo

Flare Sword


  • Please log in to reply
4 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 18 April 2019 - 08:06 PM

hi. I would like to share you an idea for the script that would be nice. I wish to uses that script for the sword that i named it the 'Flare Sword' (using Level 2 sword). The script would be simple: When Link slash with the sword some flames will appears for some seconds where Link slash his sword and the sword will shoot a fireball. It'll not lit torchs but can be usefull for activing some switch or stuff that requires the fireball from the Flare Sword. When Link does a spin attack then a cercle of fire will appears where Link is. The fire will be usefull against somes enemies that i planning to make making them weak against the fire from the Flare Sword. (The Ember Seed would be effective too but a little bit less.) I would only need the D1 for the Fire sprites and D2 for the fireball sprite. 

Oh and before i forget: the fire would not affect waters enemies like Zora. 
I already had the sprite for this sword.



#2 Shane

Shane

    💙

  • Moderators
  • Pronouns:He / Him
  • Location:South Australia

Posted 19 April 2019 - 10:17 AM

Avataro took on your script request. :)

 

flaresword.gif

 

The Script:

import "std.zh"
import "ffcscript.zh"

item script FlareSwordItem{
    void run(int nothing, int firesprite){
        int name[] = "FlareSwordFFC";
        int args[8];
        args[0] = firesprite;
        RunFFCScript(Game->GetFFCScript(name), args);
    }
}

ffc script FlareSwordFFC{
    void run(int firesprite){
        int SwordX;
        int SwordY;
        int PreviousSwordX;
        int PreviousSwordY;
        int SwordDmg;
        while(true){
            SwordX = -1000;
            SwordY = -1000;
            for (int i = Screen->NumLWeapons(); i > 0; i--) {
                lweapon wpn = Screen->LoadLWeapon(i);
                if ( wpn->ID == LW_SWORD ) {
                    SwordX = wpn->X;
                    SwordY = wpn->Y;
                    SwordDmg = wpn->Damage;
                }
            }
            if ( SwordX == -1000 && SwordY == -1000 )
                Quit();
            if ( Link->Action != LA_CHARGING && Link->Action != LA_GOTHURTLAND && (SwordX != PreviousSwordX || SwordY != PreviousSwordY) ) {
                Game->PlaySound(13);
                lweapon wpn = CreateLWeaponAt(LW_FIRE, SwordX, SwordY);
                wpn->UseSprite(firesprite);
                wpn->Damage = SwordDmg;
                wpn->Step = 0;
            }
            PreviousSwordX = SwordX;
            PreviousSwordY = SwordY;
            Waitframe();
        }
    }
}

Requires ffcscript.zh.

 

Put the item and ffc scripts into slots.

Use a sword item and give it the FlareSwordItem action script.
D1 of the item is the flame sprite.
For the fireball, use a sword beam.
For enemy flame defenses, use their Fire Defense.
 
Check out the test quest for an example: https://cdn.discorda.../flaresword.qst

  • ShadowTiger and Bagu like this

#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 19 April 2019 - 10:55 AM

thanks alot :) i was not expected that to be honest. However if i can ask: How can i keep the Flare Sword item if for exemple Link gets the Master Sword ? also it would help if the wooden sword does not transform into the Flare Sword but keeping the Sword item type for the Flare Sword. If i ask you that is that i wish to have 2 differants swords in this quest: the 'normal' sword item type and the 'scripted' sword item type. Normal swords types would changes when Link update the sword while the scripted swords type would appears as differents item in the subscreen.  It's an idea that i do inspired from Breath of Wilds sorta.


Edited by Sans, 19 April 2019 - 11:23 AM.


#4 Shane

Shane

    💙

  • Moderators
  • Pronouns:He / Him
  • Location:South Australia

Posted 19 April 2019 - 12:12 PM

Use item override.



#5 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 19 April 2019 - 05:33 PM

okey. 




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users