Jump to content

Photo

Flower Script Request


  • Please log in to reply
26 replies to this topic

#1 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 16 April 2016 - 06:56 PM

Since there's no "Flowers->Next" combo type, I'd like to request a global script that changes any "Flowers" combo to the next combo in the combo list when slashed (and I'd like it to work so that if you have a screen full of flower combos, only the flower combos you actually slash change).


Edited by Cukeman, 16 April 2016 - 08:54 PM.


#2 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 16 April 2016 - 07:06 PM

I believe this can be done with regular secret flags. It is how people get the illusion of having multiple under combos. Just give the slashable flower combo an inherent secret flag. This should also only trigger that combo. If you want the petal-flying effect, you can use a "bush" combo, and still use secret flags, iirc.

 

I have not tested this, but I seem to recall doing it before, and seeing it done.



#3 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 16 April 2016 - 07:11 PM

   Even if I used self-only secret flags, it would still set off the secret chime every time a flower is slashed. I could turn off the chime, but then I wouldn't have a chime for actual secrets in the room.

   Also, my flower clippings use different graphics from my bush clippings.

 

EDIT: Besides, setting up secrets on every screen with flowers is kinda overkill


Edited by Cukeman, 16 April 2016 - 07:25 PM.


#4 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 07:36 PM

   Even if I used self-only secret flags, it would still set off the secret chime every time a flower is slashed. I could turn off the chime, but then I wouldn't have a chime for actual secrets in the room.

   Also, my flower clippings use different graphics from my bush clippings.

 

EDIT: Besides, setting up secrets on every screen with flowers is kinda overkill

 

Actually, that's not how it works. Any combo that is slash-able (grass, flowers, pots, bushes, etc.) which has flags 16-31 will change to whatever that secret it set to without playing the secret sound. Secrets sounds are triggered by the secrets being set off by the use of item specific flags and the enemies dying. And by scripts.

 

This could be done by script, too without too much trouble. I just don't see any reason why you would need to.



#5 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 16 April 2016 - 07:51 PM

I could give them inherent Secret Tile flag, but I'd still have to apply Trigger Self Only to each one by hand, right?

 

What are the Script 1-5 combo types? Sounds like those might be easier than a global script, maybe?


Edited by Cukeman, 16 April 2016 - 09:10 PM.


#6 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 07:56 PM

I could give them inherent Secret Tile flag, but I'd still have to apply Trigger Self Only to each one by hand, right?

 

What are the Script 1-5 combo types? Sounds like those might be easier than a global script, maybe?

 

You wouldn't have to do trigger self only at all I believe. I did something like this in 2.10 in my quest 'Ganon's Legacy' to have more than one type of undercombo.

 

As for those scripted combo types and flags, they're used for whatever scripts want to use them for. The only limits are the language, the program and your imagination.



#7 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 16 April 2016 - 08:15 PM

EDIT: See, when I tried this, the secret tiles didn't appear until after I'd activated the screen secret- until then they just showed up as the undercombo combo 0.


Edited by Cukeman, 16 April 2016 - 08:56 PM.


#8 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 08:18 PM

Hmm... weird. I wonder if that's a bug that they fixed in newer versions.

 

I can't tell how you're doing it without screenshots or an example quest, though. So I can't determine whether you're doing it correctly.



#9 NoeL

NoeL

    Legend

  • Members
  • Real Name:Jerram

Posted 16 April 2016 - 08:33 PM

The secret flag -> undercombo trick also won't work since he has a secret on that screen already. If he activates the secret without slashing the flowers they'll all change to secret combos anyway.

 

Do you have any other elements on the screen that use the undercombo? If not, just set the undercombo to the combo after the flower combo.

 

Alternately, set the undercombo to a blank tile and use layer 1 or 2 (set to "draw under layer 0") to draw all the undercombos on a separate layer.

 

EDIT: That said, if the flowers having a unique undercombo happens throughout the quest a script would be your best bet. I don't know zscript though so can't help you there.


Edited by NoeL, 16 April 2016 - 08:36 PM.

  • Cukeman likes this

#10 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 08:36 PM

The secret flag -> undercombo trick also won't work since he has a secret on that screen already. If he activates the secret without slashing the flowers they'll all change to secret combos anyway.

 

I must have missed that. If that's the case, then a script is definitely the way to go. It can be done, just doing it might be a bit... complicated. I'll give it a shot at least. I'll let you know how it turns out.


  • Cukeman likes this

#11 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 16 April 2016 - 08:48 PM

Example quest file. Slash some (not all flowers) then bomb the cave. Flowers slashed before bombing won't use the secret tile (or the undercombo actually), after the bombing all flowers become secret tiles without waiting to be slashed.

[old link removed]

EDIT: Ninja'd by the previous two posts

 

EDIT 2: So maybe giving an inherent "slash>next" scripted flag (98-102) to a flower type combo would be easiest?

 

EDIT 3: Or maybe global is better so those scripted flags can be reserved for better uses. Just thinking out loud.


Edited by Cukeman, 17 April 2016 - 12:18 AM.


#12 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 09:02 PM

Alright, try this.

int ScreenCombos[176];//Array to store combos in.
int OldScreen;//Tracks what screen you're on.

const int FLOWER_UNDER_COMBO = 0;//Set to whatever combo is used by the flowers as an undercombo.
//Note: Does not currently support multiple undercombos for flowers that look different.
//While that can be done, it is significantly more complex.

global script Active{
	void run(){
		while(true){
			UpdateFlowers();//Handles the flowers->Next stuff. 
			Waitdraw();
			if(OldScreen != Game->GetCurScreen())OldScreen= Game->GetCurScreen();//Save what screen you're on if it changes.
			Waitframe();
		}
	}
}

void UpdateFlowers(){
	int i;//Iterative variable.
        //The current screen has changed.
	if(OldScreen!=Game->GetCurScreen()){
                //Reset the array.
		for (i = 0; i < 175; i++ )
			if(Screen->ComboD[i]==CT_FLOWERS )ScreenCombos[i]= Screen->ComboD[i];
	}
        //Keep track of all combos.
        //If they were flowers and changed, make them the right under combo.
	for (i = 0; i < 175; i++ ){
		if(ScreenCombos[i] !=0 && Screen->ComboD[i]!=CT_FLOWERS){
                       Screen->ComboD[i]= ScreenCombos[i]++;
                       ScreenCombos[i]=0;
               }
        }
}

This is completely untested, but I can't think of any reasons why it shouldn't work.


Edited by ywkls, 16 April 2016 - 09:32 PM.


#13 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 16 April 2016 - 09:22 PM

I have to go somewhere , so I'll check out that script in a bit.

If scripting the "change to next combo in the combo list" is difficult, this script I have might (potentially) be a useful reference:

 

http://www.purezc.ne...=53335&p=763981



#14 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 09:29 PM

I have to go somewhere , so I'll check out that script in a bit.

If scripting the "change to next combo in the combo list" is difficult, this script I have might (potentially) be a useful reference:

 

It's just... you asked for this to be global.

 

Flowers already change whenever they're struck. Normally, this is to the undercombo. To make it be anything else, the script has to know what that is. At an ffc level, we can store that via arguments. At a global level, it's a little more difficult.

 

I edited the script above because of a potential error that could occur.

 

Edit: Never mind. I thought of a way. This is theoretical, but reference the above script.


Edited by ywkls, 16 April 2016 - 09:32 PM.


#15 ywkls

ywkls

    Master

  • Members

Posted 16 April 2016 - 10:33 PM

I just thought of another potential complication.

int ScreenCombos[176];//Array to store combos in.
int OldScreen;//Tracks what screen you're on.

const int FLOWER_UNDER_COMBO = 0;//Set to whatever combo is used by the flowers as an undercombo.
//Note: Does not currently support multiple undercombos for flowers that look different.
//While that can be done, it is significantly more complex.

global script Active{
	void run(){
		while(true){
			UpdateFlowers();//Handles the flowers->Next stuff. 
			Waitdraw();
			if(OldScreen != Game->GetCurScreen())OldScreen= Game->GetCurScreen();//Save what screen you're on if it changes.
			Waitframe();
		}
	}
}

void UpdateFlowers(){
	int i;//Iterative variable.
        //The current screen has changed.
	if(OldScreen!=Game->GetCurScreen()){
                //Reset the array.
		for (i = 0; i < 175; i++ ){
                        ScreenCombos[i]= 0;
			if(Screen->ComboD[i]==CT_FLOWERS )ScreenCombos[i]= Screen->ComboD[i];
                }
	}
        //Keep track of all combos.
        //If they were flowers and changed, make them the right under combo.
	for (i = 0; i < 175; i++ ){
		if(ScreenCombos[i] !=0 && Screen->ComboD[i]!=CT_FLOWERS){
                       Screen->ComboD[i]= ScreenCombos[i]++;
                       ScreenCombos[i]=0;
               }
        }
}

The first version of this script wouldn't actually clear the array when the screen changed. So it would register combos from previous screens. This one should work as intended.


Edited by ywkls, 16 April 2016 - 10:33 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users