Jump to content

Photo

Triforce Sound Effect


  • Please log in to reply
24 replies to this topic

#1 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 03 June 2019 - 09:53 AM

Is there a way to change the music that plays when you get the Triforce to a non-MIDI?



#2 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 03 June 2019 - 10:18 AM

Okay so you put invisible warp tiles closely around the triforce and they warp you directly on top of it, but on another DMap where the enhanced music is playing. And use cutscene type 0 so it doesn't interrupt the DMap music. Then put triggers behind the triforce to remove the warp tiles.

 

Or use a pickup sfx or a script?

 

Short answer: nah it's not possible.


Edited by Avataro, 03 June 2019 - 11:48 AM.

  • ShadowTiger and Twilight Knight like this

#3 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 03 June 2019 - 10:33 AM

Alright, thanks.



#4 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 04 June 2019 - 04:46 PM

Are the other Triforce effects unimportant to you? Would a .wav SFX be sufficient?

 

If so you could use a fake Triforce item, simply another item that looks like the Triforce, but it isn't. Then you can give it a pickup SFX.

 

The warp after picking it up can be simulated by pickup script that triggers the screen secrets after a certain timespan and sensitive warp combos will be around Link when the secrets are triggered.

 

Now you surely also want this fake Triforce to give a piece of the real Triforce. You can do that via the same script by simply adding it in Link's inventory.

 

If this would work for you I can help with the scripts if it's necessary. :-)

 

 

There might be a completely easier way, but I think this solution requires the least effort after setting up the script.


  • Lightwulf likes this

#5 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 04 June 2019 - 07:06 PM

I don't even really need a warp. In fact I'd rather not have one. I don't know if cutscene type 0 allows a pickup sound effect.

If not, does Item Bundle work for Triforce Pieces?

#6 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 05 June 2019 - 12:45 AM

I don't even really need a warp. In fact I'd rather not have one. I don't know if cutscene type 0 allows a pickup sound effect.

If not, does Item Bundle work for Triforce Pieces?

`Game->LItems[Game->GetCurLevel()] |= LI_TRIFORCE;` will give the current level's triforce


  • Twilight Knight likes this

#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 June 2019 - 03:31 AM

You can give it a silent MIDI, and call Audio->PlayEnhancedMusic("name") from its item collect script.

#8 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 06 June 2019 - 07:36 AM

You can give it a silent MIDI, and call Audio->PlayEnhancedMusic("name") from its item collect script.

...That'd work.

 

Now to try and make a quick script to get that done.



#9 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 06 June 2019 - 08:14 AM

...That'd work.

 

Now to try and make a quick script to get that done.

//play the enhanced music used on DMap D0
item script PlayEnhancedMusic{
	void run(int dmap){
		int dmapmusic[256];
		Game->GetDMapMusicFilename(dmap, dmapmusic);
		Game->PlayEnhancedMusic(dmapmusic, Game->GetDMapMusicTrack(dmap));
	}
} 

That should be it. Plays the music that's set up on the DMap specified as D0.


  • klop422 likes this

#10 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 06 June 2019 - 11:02 AM

Oh, thanks. I was gonna try and work it out myself, but that'd probably have turned out quite messy.

I presume this works on 2.53, or do I have to update to 2.55?



#11 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 06 June 2019 - 11:41 AM

Oh, thanks. I was gonna try and work it out myself, but that'd probably have turned out quite messy.

I presume this works on 2.53, or do I have to update to 2.55?

I think that's all 2.53-usable



#12 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 14 August 2020 - 08:38 PM

I realise it's more than a year later, but that script doesn't seem to work on Triforce pieces. I tested it on other items and it seemed to work fine, so I guess it's an issue with the Triforce pieces themselves?



#13 ywkls

ywkls

    Master

  • Members

Posted 26 August 2020 - 12:48 PM

I realise it's more than a year later, but that script doesn't seem to work on Triforce pieces. I tested it on other items and it seemed to work fine, so I guess it's an issue with the Triforce pieces themselves?

I don't know if this has been adjusted but in 2.50.2 and older, Triforce pieces can't run pickup scripts.

// This is a pickup script that will display a message when obtaining an item.
// D0 is the string number.
item script TF_Piece{
	void run(int dmap, int level){
		Game->LItems[level]|=LI_TRIFORCE;
		int Args[8]= {dmap};
		RunFFCScript(WARP_SCRIPT,dmap);
	}
}

//Change to what script slot this is
const int WARP_SCRIPT = 0;//Script to warp out of a dungeon upon obtaining an item.
const int CMB_AUTOWARP= 0;//Combo with type Auto SideWarp A

ffc script Triforce_Warp{
	void run(int dmap){
		int dmapmusic[256];
		Game->GetDMapMusicFilename(dmap, dmapmusic);
		Game->PlayEnhancedMusic(dmapmusic, Game->GetDMapMusicTrack(dmap));
		FadeFromSides(2,0x0F);
		Link->HP= Link->MaxHP;
		Link->MP= Link->MaxMP;
		this->Data = CMB_AUTOWARP;
	}
}

void FadeFromSides(int fadespeed, int color){
    for(int q = 0; q < 128; ++q){
        for(int timer = 0; timer < fadespeed; ++timer){
            Screen->Rectangle(7, 0, 0, q, 168, color, 1, 0, 0, 0, true, OP_OPAQUE);
            Screen->Rectangle(7, 256-q, 0, 256, 168, color, 1, 0, 0, 0, true, OP_OPAQUE);
            WaitNoAction();
        }
    }
}

This is an adjusted version of the script I use for my quest, complete with Fade Out animation,

You can also add a message that displays before the fade out if you want.



#14 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 26 August 2020 - 02:52 PM

Wait, so does this script pretty much emulate the Triforce cutscene?

 

Presumably I'd make a 'fake' Triforce piece with the item script, and place the FFC script on the Triforce screen?



#15 ywkls

ywkls

    Master

  • Members

Posted 26 August 2020 - 03:11 PM

Wait, so does this script pretty much emulate the Triforce cutscene?

 

Presumably I'd make a 'fake' Triforce piece with the item script, and place the FFC script on the Triforce screen?

Yes to your first question.

To your second question, it would be a fake Triforce piece.

However, the script automatically runs the ffc script when the item is picked up.

Uses SideWarp A to determine where you warp to.

RunFFCScript is included with ffcscript.zh


Edited by ywkls, 26 August 2020 - 03:12 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users