Jump to content

Photo

One Combo, Many Outcomes Depending on Item Used

ffc combo flag trigger request

  • Please log in to reply
4 replies to this topic

#1 Spacepoet

Spacepoet

    Initiate

  • Members

Posted 01 September 2018 - 02:44 AM

Hi! I'm looking for a script that would allow me to have a single combo change into one of many different other specific combos depending on which item was used on it.

 

I want to be able to make one master combo that is capable of producing 1 of 5 different combos when 1 of 5 different items is used to trigger it.

 

Item 1 produces combo A, Item 2 produces combo B, ect ect.

 

preferably a combo script where i can set the item IDs of what the 5 different items are, and have it correspond to the Secret Tiles 11 - 15 throughout my whole quest (or even specific designated combo numbers straight from the combo page?) Just assign the script to the combo i want it on and it should be good?

 

I may be oversimplifying the concept, and there may be a better way to handle this type of operation, and if you have any better ideas, please feel free to let me know! I've tried to think of a way this could work with secret flags/ triggers, but i'm stumped :(

 

Thanks for any and all help, and credit is of course given in my finished quest :)


Edited by Spacepoet, 01 September 2018 - 02:47 AM.


#2 Avataro

Avataro

    Quest maker

  • Members
  • Real Name:Robin
  • Gender:Male
  • Location:Germany

Posted 02 September 2018 - 07:30 AM

A way it could work with secret flags and triggers is that the combo cycles between 5 different ones rapidly, each having a different trigger flag.



#3 klop422

klop422

    Evil Crazy Mastermind

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

Posted 02 September 2018 - 10:33 AM

Do most items act over at least 5 frames?



#4 Spacepoet

Spacepoet

    Initiate

  • Members

Posted 02 September 2018 - 11:38 PM

that is a very very good idea! I will have to look into implementing that and let you know how it goes! Thanks so much!



#5 jsm116

jsm116

    Script kludger

  • Members
  • Gender:Unspecified
  • Location:The 301

Posted 10 October 2018 - 03:46 PM

Very lightly tested. It's functional but I can't guarantee it won't break in the presence of other FFC wizardry

 

This goes outside your global script:

const int MULTITRIGGER_BLANK = 65279;	//Transparent combo with no collision and no flags/type
const int CF_MULTITRIGGER = 98;		//Combo Flag Script 1

This goes in your global script, somewhere above Waitframe();

int triggerscreen;
ffc triggerffc;

if(Game->GetCurScreen() != triggerscreen)  //Scan for the secret flag when the screen loads
{
	triggerscreen = Game->GetCurScreen();
	for(int i = 0; i < 176; i++)
	{
		if(ComboFI(i, CF_MULTITRIGGER))
		{
			triggerffc->X = ComboX(i);
			triggerffc->Y = ComboY(i);
			triggerffc->Data = MULTITRIGGER_BLANK;
		}
	}
}
			
if(Screen->NumLWeapons() > 0)  //Scan for link weapons
{
	lweapon checkit;
	
	int triggerloc;
	
	for(int i=0; i <= Screen->NumLWeapons(); i++)
	{
		checkit = Screen->LoadLWeapon(i);
		
		if(Collision(triggerffc, checkit) && triggerffc->Data == MULTITRIGGER_BLANK)
		{
			triggerloc = ComboAt(triggerffc->X, triggerffc->Y);
			if(checkit->ID == LW_SWORD || checkit->ID == LW_BEAM)  //Sword or sword beams
			{
				Screen->ComboF[triggerloc] = CF_SECRETS11;
			}
			else if(checkit->ID == LW_ARROW)  //Arrows
			{
				Screen->ComboF[triggerloc] = CF_SECRETS12;
			}
			else if(checkit->ID == LW_MAGIC)  //Wand magic but not the wand itself
			{
				Screen->ComboF[triggerloc] = CF_SECRETS13;
			}
			Screen->TriggerSecrets();
			triggerffc->Data = 0;
		}
	}
}

The conditionals should be pretty straightforward to modify to your liking. Put combo flag 98 (or whatever you use) on the target and then assign the secret combos as you wish.





Also tagged with one or more of these keywords: ffc, combo, flag, trigger, request

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users