Jump to content

Photo

FFC to change to a LTM


  • Please log in to reply
8 replies to this topic

#1 Rocksfan13

Rocksfan13

    Looks best in Blue

  • Members
  • Real Name:Doug
  • Gender:Male
  • Location:Earth

Posted 11 January 2019 - 11:32 AM

Hello all script gurus.

 

I am in need of a ffc that will change link's tile to a Link Tile Modifier when Link walks on a specific combo.

When he steps off, it goes back the original set.

 

Basically I am looking to have Link look like he is actually climbing a ladder and not just walking up.

 

I've seen this sorta done on a few quests, but Link's tile was animated even if he wasn't moving.

I would like to avoid that if possible.

Also, if it's possible, I'd like it to act the slow walk combo type.

 

Thank you all that you guys do!!


Edited by Rocksfan13, 11 January 2019 - 11:34 AM.


#2 TheRock

TheRock

    Go glitches

  • Members
  • Gender:Male

Posted 11 January 2019 - 12:00 PM

Use the flippers and water. When you Link goes on the ladder combo it will look like he's climbing. This will also add that you can't use items while using the ladder. 



#3 Moosh

Moosh

    Deified

  • Members
  • Gender:Male

Posted 11 January 2019 - 01:32 PM

//Example global script
global script ExampleMain2{
	void run(){
		while(true){
			LadderLTM_Update1();
			Waitdraw();
			LadderLTM_Update2();
			Waitframe();
		}
	}
}

const int I_LTM_LADDER = 143; //The item with the LTM for the ladder animation
const int CF_LTM_LADDER = 98; //A combo flag that's placed on ladders

void LadderLTM_Update1(){
	//If Link is in the air he can't be on the ladder
	if(Link->Z==0){
		//Give/take the item based on if he's over the flag
		if(ComboFI(Link->X+8, Link->Y+12, CF_LTM_LADDER)){
			//Disable item inputs to prevent weird/broken animations
			Link->InputA = false; Link->PressA = false;
			Link->InputB = false; Link->PressB = false;
			if(!Link->Item[I_LTM_LADDER])
				Link->Item[I_LTM_LADDER] = true;
		}
		else{
			if(Link->Item[I_LTM_LADDER])
				Link->Item[I_LTM_LADDER] = false;
		}
	}
	else{
		if(Link->Item[I_LTM_LADDER])
			Link->Item[I_LTM_LADDER] = false;
	}
}

void LadderLTM_Update2(){
	if(Link->Item[I_LTM_LADDER])
		Link->Dir = DIR_UP;
}

Here's the script as requested. I made it a global script instead of an FFC because LTM scripts will bug out with F6 if they aren't global. Hope that doesn't cause too much issue. 

 

To use it, just set the two constants as instructed and combine with your global script. The ladder flag can be placed or inherent and you can place it over slow walk combos for the slowing behavior. I also made it face Link upwards for extra measure.



#4 klop422

klop422

    Evil Crazy Mastermind

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

Posted 11 January 2019 - 01:36 PM

Use the flippers and water. When you Link goes on the ladder combo it will look like he's climbing. This will also add that you can't use items while using the ladder. 

Problem with this is it doesn't work if you're using swimmable water in your quest.



#5 Rocksfan13

Rocksfan13

    Looks best in Blue

  • Members
  • Real Name:Doug
  • Gender:Male
  • Location:Earth

Posted 14 January 2019 - 09:33 AM

//Example global script
global script ExampleMain2{
	void run(){
		while(true){
			LadderLTM_Update1();
			Waitdraw();
			LadderLTM_Update2();
			Waitframe();
		}
	}
}

const int I_LTM_LADDER = 143; //The item with the LTM for the ladder animation
const int CF_LTM_LADDER = 98; //A combo flag that's placed on ladders

void LadderLTM_Update1(){
	//If Link is in the air he can't be on the ladder
	if(Link->Z==0){
		//Give/take the item based on if he's over the flag
		if(ComboFI(Link->X+8, Link->Y+12, CF_LTM_LADDER)){
			//Disable item inputs to prevent weird/broken animations
			Link->InputA = false; Link->PressA = false;
			Link->InputB = false; Link->PressB = false;
			if(!Link->Item[I_LTM_LADDER])
				Link->Item[I_LTM_LADDER] = true;
		}
		else{
			if(Link->Item[I_LTM_LADDER])
				Link->Item[I_LTM_LADDER] = false;
		}
	}
	else{
		if(Link->Item[I_LTM_LADDER])
			Link->Item[I_LTM_LADDER] = false;
	}
}

void LadderLTM_Update2(){
	if(Link->Item[I_LTM_LADDER])
		Link->Dir = DIR_UP;
}

Here's the script as requested. I made it a global script instead of an FFC because LTM scripts will bug out with F6 if they aren't global. Hope that doesn't cause too much issue. 

 

To use it, just set the two constants as instructed and combine with your global script. The ladder flag can be placed or inherent and you can place it over slow walk combos for the slowing behavior. I also made it face Link upwards for extra measure.

 

 

Thank you Moosh.

 

Now, I already have a global script for pits, so I will need assistance with combining globals.

I saw a thread that someone made to help with this. IS it reliable?

 

TheRock;

 

Theklop is right. I do plan on using swim-able water. Otherwise, its not a bad idea.


Edited by Rocksfan13, 14 January 2019 - 09:35 AM.


#6 judasrising

judasrising

    I play guitar

  • Members
  • Gender:Male
  • Location:Sweden but born in Finland

Posted 14 January 2019 - 10:47 AM

Thank you Moosh.

 

Now, I already have a global script for pits, so I will need assistance with combining globals.

I saw a thread that someone made to help with this. IS it reliable?

 

TheRock;

 

Theklop is right. I do plan on using swim-able water. Otherwise, its not a bad idea.

 

Thank you Moosh.

 

Now, I already have a global script for pits, so I will need assistance with combining globals.

I saw a thread that someone made to help with this. IS it reliable?

 

TheRock;

 

Theklop is right. I do plan on using swim-able water. Otherwise, its not a bad idea.

I can help combining the script if you need help.


Edited by judasrising, 14 January 2019 - 10:49 AM.


#7 Rocksfan13

Rocksfan13

    Looks best in Blue

  • Members
  • Real Name:Doug
  • Gender:Male
  • Location:Earth

Posted 14 January 2019 - 11:18 AM

I can help combining the script if you need help.

 

Thank you.

 

I was able to use Moosh's combiner and it worked perfectly.

 

However, upon testing this script, the LTM does not function.

It does change the direction of Link to look up though, but it is the only thing.

 

Upon further troubleshooting, it appears that the LTM does not adjust for the up animation.

If Link gets another shield, it breaks.

 

So, I don't know if this should be just a straight animation with a forced Link UP motion.

If nothing else, this will at least work to force LInk to look up every time.


Edited by Rocksfan13, 14 January 2019 - 12:10 PM.


#8 Moosh

Moosh

    Deified

  • Members
  • Gender:Male

Posted 14 January 2019 - 12:19 PM

Thank you.

 

I was able to use Moosh's combiner and it worked perfectly.

 

However, upon testing this script, the LTM does not function.

It does change the direction of Link to look up though, but it is the only thing.

 

Upon further troubleshooting, it appears that the LTM does not adjust for the up animation.

If Link gets another shield, it breaks.

 

So, I don't know if this should be just a straight animation with a forced Link UP motion.

If nothing else, this will at least work to force LInk to look up every time.

The cause of the LTM not changing the up facing sprite is a wonderful little quest rule called Expanded Link Tile Modifiers, under the Animation category. Older quests I guess must've really needed those few extra tiles of space and so up facing sprites were ignored by shields.



#9 Rocksfan13

Rocksfan13

    Looks best in Blue

  • Members
  • Real Name:Doug
  • Gender:Male
  • Location:Earth

Posted 14 January 2019 - 12:47 PM

The cause of the LTM not changing the up facing sprite is a wonderful little quest rule called Expanded Link Tile Modifiers, under the Animation category. Older quests I guess must've really needed those few extra tiles of space and so up facing sprites were ignored by shields.

 

Well, well, well. Of course that was it.

 

Thanks again Moosh!!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users