Jump to content

Photo

Custom Amulet


  • Please log in to reply
1 reply to this topic

#1 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 18 June 2018 - 06:25 AM

So I want to include the Amulet in my quest, but I don't want the invisible enemies to have that telltale shimmer revealing their location on the screen.

 

Therefore I would like to request a custom item that does something similar.

 

When Link enters the screen, he will press the button, a SFX will play, and the invisible enemies will become visible.

 

I'm not entirely sure the best way to go about this, but I'm thinking it's probably an Item Script and a FFC Script that work together. Like, if the FFC Script is on that screen, then pressing the item button will play the SFX and increase the all the onscreen enemy IDs by one (but it will only happen once per screen). That way the enemies would change from a version of that enemy which is invisible and invincible (based on its enemy editor settings) to one that is visible and vulnerable (also based on the enemy editor settings).


Edited by Cukeman, 18 June 2018 - 07:10 AM.


#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 19 June 2018 - 08:53 PM

So I want to include the Amulet in my quest, but I don't want the invisible enemies to have that telltale shimmer revealing their location on the screen.

 

Therefore I would like to request a custom item that does something similar.

 

When Link enters the screen, he will press the button, a SFX will play, and the invisble enemies will become visible.

 

I'm not entirely sure the best way to go about this, but I'm thinking it's probably an Item Script and a FFC Script that work together. Like, if the FFC Script is on that screen, then pressing the item button will play the SFX and increase the all the onscreen enemy IDs by one (but it will only happen once per screen). That way the enemies would change from a version of that enemy which is invisible and invincible (based on its enemy editor settings) to one that is visible and vulnerable (also based on the enemy editor settings).

 

I did this with my EctoGoggles item. It tints the screen, and reveals invisible enemies while active, draining MP.while it is active.

 

If you don't care about the blurry outlines, this is relatively easy; but if you want to be rid of those, too, then it's harder.

 

This would be an item script, coupled with function calls in your active script, as it needs to run perpetually to work in a desirable manner.

int lastscr[2];

//Call in your active script, prior to Waitdraw();
void ClearAmulet()
{
    if ( lastscr[0] != Game->GetCurDMap() || lastscr[1] != Game->GetCurScreen() )
    {
        lastscr[0] = Game->GetCurDMap(); lastscr[1] = Game->GetCurScreen();
        Link->Item[I_AMULET1] = false; //clear tempAmulet on screen change of any kind.
    }
}

//Place on a custom item class item, assign a magic cost if desired.
//D0: The sound effect to use.
item script TempAmulet
{
    void run(int sfx)
    {
        Link->Item[I_AMULET1] = true;
    }
}

global script AmuletExample
{
    void run()
    {
        while(1)
        {
            ClearAmulet();
            Waitdraw();
            Waitframe();
        }
    }
}

No drain effect here. The item reveals invisible enemes on a screen, once used.


If you want a visual overlay, thyat's easy to do with DrawTile at OP_TRANS using a full tile page.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users