Jump to content

Photo

Stop compass blinking on item pickup/boss kill


  • Please log in to reply
4 replies to this topic

#1 Lüt

Lüt

    Germanize

  • Members
  • Real Name:Steve
  • Location:Chicago

Posted 02 July 2017 - 10:54 AM

It appears that the compass can't currently be assigned to any purpose other than a Triforce piece in the item editor. But what about side dungeons where you either collect a special item, or mini dungeons that require you to defeat a guardian to move on to the next segment of the game?

 

I use both of these, as do many others, and since they can be relatively large, I believe the standard map & compass system is appropriate for them.

 

The issue, however, is getting the compass to stop blinking once the item is picked up or the boss is killed.

 

So I'm figuring (hoping) both of these can be simple FFC scripts. You place one in the boss room that checks if the "Dungeon Boss (Don't Return)" setting has been triggered, or perhaps if all enemies have been killed in the same way that "Enemies -> Secrets" is triggered (though obviously it has to stay permanent). You place the other in the special item room that checks if the special item has been picked up, or perhaps it could even be an item pickup script. And in each case, compass blink disabled.

 

I could live with one the dungeon boss one if both are too much hassle, but I believe both could be useful to anybody doing non-Triforce dungeons. Is this doable?



#2 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 02 July 2017 - 11:32 AM

No problem at all.

The item's trivial:
item script StopCompass
{
    void run()
    {
        Game->LItems[Game->GetCurLevel()]|=LI_TRIFORCE;
    }
}

This is a very basic implementation of the enemy trigger. It just waits until all the enemies are gone, but that includes things like traps and statues. It does exclude fairies, though.
ffc script StopCompassAfterEnemies
{
    void run()
    {
        while(Screen->NumNPCs()==0)
            Waitframe();
        while(Screen->NumNPCs()>NumNPCsOf(NPC_ITEMFAIRY))
            Waitframe();
        Game->LItems[Game->GetCurLevel()]|=LI_TRIFORCE;
    }
}

  • Timelord and Lüt like this

#3 ywkls

ywkls

    Master

  • Members

Posted 02 July 2017 - 11:47 AM

That works? I thought you'd have to rescript the whole map system to implement a feature of that sort.

 

@Saffith- I presume you have to make the DMap a separate level number from all other dungeons (and not numbered 1-8 ) for this to function?


Edited by ywkls, 02 July 2017 - 11:47 AM.


#4 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 02 July 2017 - 01:10 PM

Yes. All DMaps with the same level share compasses and maps, so I expect it's set up that way already.

#5 Lüt

Lüt

    Germanize

  • Members
  • Real Name:Steve
  • Location:Chicago

Posted 02 July 2017 - 02:55 PM

I just tested these in all the locations I planned to use it, and they worked flawlessly every time. Exactly what I wanted, thanks a lot!

 

And yes, all dungeons/caves/etc. were Levels 10+.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users