Jump to content

Photo

Script Help: Level 0 Bracelet/Disable Pushing 0 Level Blocks


  • Please log in to reply
20 replies to this topic

#1 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 12 February 2020 - 04:29 AM

Is there a way to sctipt where it prevents level 0 blocks to be pushed until Link has a Bracelet so that i don't have to waste the combo type to be heavy?

 

Using 2.53


Edited by RephireZeKasual217, 12 February 2020 - 04:31 AM.


#2 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 12 February 2020 - 02:31 PM

What do you mean by "waste the combo type"? What other combo type do you want to use on these combos? Or do you want bracelet items to have three power levels?



#3 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 12 February 2020 - 03:22 PM

I mean that i can still have pushable hookshot grabs, mirrors, slash combos, ect., but have it to where Link can't push those combos until he has a bracelet.

Edited by RephireZeKasual217, 12 February 2020 - 03:24 PM.


#4 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 13 February 2020 - 12:16 AM

Or, if there is a variable/function i can turn off to disable block pushing until Link gets a bracelet.

Edited by RephireZeKasual217, 13 February 2020 - 12:17 AM.


#5 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 February 2020 - 10:47 PM

The only way to prevent pushing getting the bracelet is to either use a complex script (not even going to begin thinking of how to do that), or to use the heavy types.



#6 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 14 February 2020 - 01:13 AM

Okay, sounds good. I can work with not having it.

Edited by RephireZeKasual217, 14 February 2020 - 01:16 AM.


#7 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 14 February 2020 - 03:57 AM

Okay, how about this, a ffc script where a push combo on screen can have multiple combo types at once, like Push (Heavy) with Hookshot Grab.

 

Potential Example:

D1: Combo

D2: Combo Type 1

D3: Combo Type 2

 

Or something like that, is that possible?


Edited by RephireZeKasual217, 14 February 2020 - 04:23 AM.


#8 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 14 February 2020 - 05:27 AM

You could just have a script that removes the push flags on every combo as you enter the screen, if the player doesn't have a bracelet.



#9 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 14 February 2020 - 06:26 AM

I tried to get that idea to work, but to no avail, but that's only because of my honestly less-than-basic understanding of scripting. If you can get that to work, that be great. This is one of the last major scripts I would like to have to complete a set structure for quest-making.

Edited by RephireZeKasual217, 15 February 2020 - 04:35 AM.


#10 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 16 February 2020 - 04:20 AM

Try this:

ffc script BraceletRequired{
	void run(){
		// If the player doesn't have any of the three bracelet items...
		if (!Link->Item[19] && !Link->Item[56] && !Link->Item[107]){
			// Scan the screen's combos
			for (int i = 0; i < 176; i++){
				// If a combo has a push flag...
				if (Screen->ComboF[i] >= 47 && Screen->ComboF[i] <=  65){
					// Remove it
					Screen->ComboF[i] = 0;
				}
			}
		}
	}
}


#11 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 16 February 2020 - 04:24 AM

 

Try this:

ffc script BraceletRequired{
	void run(){
		// If the player doesn't have any of the three bracelet items...
		if (!Link->Item[19] && !Link->Item[56] && !Link->Item[107]){
			// Scan the screen's combos
			for (int i = 0; i < 176; i++){
				// If a combo has a push flag...
				if (Screen->ComboF[i] >= 47 && Screen->ComboF[i] <=  65){
					// Remove it
					Screen->ComboF[i] = 0;
				}
			}
		}
	}
}

Uhg, hardcoded item ID checks?

You should try `if(GetHighestLevelItemOwned(IC_BRACELET)==-1)` instead; that will check `if(you don't own ANY bracelets)`

Or, well, there is probably a more efficient check than THAT one, but, still, hardcoded checks suck.

 

EDIT: This would be more efficient to call than `GetHighestLevelItemOwned`.

bool ownItemMinLevel(int itemclass, int level)
{
	for(int i = MIN_ITEMDATA; i <= MAX_ITEMDATA; ++i)
	{
		if(!Link->Item[i])
			continue;
		id = Game->LoadItemData(i);
		if(id->Family != itemclass)
			continue;
		if(id->Level >= level)
			return true;
	}
	return false;
}


#12 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 16 February 2020 - 04:29 AM

Technically yes, but unless a questmaker is really running out of item spots, there's no reason to change the default bracelet spots  :shrug:



#13 RephireZeKasual217

RephireZeKasual217

    Initiate

  • Members

Posted 17 February 2020 - 02:55 AM

Before I say it doesn't work, is it supposed to be an ffc script, should I add the ffc on screen, and should I put the ffc on top of the specific combo? Because anything i try doesn't seem to want to work for me.



#14 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 17 February 2020 - 03:20 AM

Before I say it doesn't work, is it supposed to be an ffc script,

 

yes

 

should I add the ffc on screen,

 

yes

 

and should I put the ffc on top of the specific combo?

 

no

 

Because anything i try doesn't seem to want to work for me.

I have tried it and it works. In order to find out what you're doing wrong, I'm going to need something more specific than "it doesn't work".



#15 Soga

Soga

    Secretly Alive

  • Members

Posted 17 February 2020 - 02:39 PM

Before I say it doesn't work, is it supposed to be an ffc script, should I add the ffc on screen, and should I put the ffc on top of the specific combo? Because anything i try doesn't seem to want to work for me.

Are you using Jamian's original script or did you introduce venrob's mod to it?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users