Jump to content

Photo

ZC 2.55 Combo Editor Question


  • Please log in to reply
4 replies to this topic

#1 Peteo

Peteo

    Back in Business!

  • Members
  • Real Name:Pete
  • Location:Finland

Posted 20 January 2020 - 10:08 AM

I'm in love with the new Combo Editor, but apparently it can't do everything I wanted it to do.

 

I had this idea of an ice magic item that freezes things and can turn water combos into ice. For some reason I assumed that since you can set weapon triggers for any combo type, including the water type combos, I could have made it so that the ice magic triggers the water combos and makes them turn into the next combo that would be an ice combo. But the weapon triggers don't seem to work for water combos, and there isn't the possibility to check attributes such as Next, SFX, Visuals etc for the water combo. Weapon triggers and those attributes seem to only work for the Generic combo and the bush/grass style combos. Is there any way around that without resorting to scripts?

 

I could do it the old fashioned way with secret combo flags but it's not as fluent and easy as it would have been with combos.



#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 20 January 2020 - 12:00 PM

I don't personally fully know my way around the new combo stuff myself yet, but I'd make a script for this.

If you make all your water combos CT_WATER (you know, normal water) and all your ice combos CT_SCRIPT1, and make sure that all such combos are set up so that the ice combo is "Next" after the water, this should work:

typedef const int DEFINE;
typedef const int CONFIG;

CONFIG CT_ICE = CT_SCRIPT1;
CONFIG MAX_ICE_LAYER = 0;

lweapon script freezeWater
{
	void run()
	{
		while(true)
		{
			freeze(ComboAt(this->X, this->Y));
			freeze(ComboAt(this->X+15, this->Y));
			freeze(ComboAt(this->X, this->Y+15));
			freeze(ComboAt(this->X+15, this->Y+15));
			Waitframe();
		}
	}
	
	void freeze(int loc)
	{
		for(int q = 0; q <= MAX_ICE_LAYER; ++q)
		{
			mapdata scr = Game->LoadTempScreen(q);
			if(scr->ComboT[loc] == CT_WATER)
				++scr->ComboD[loc];
		}
	}
}

lweapon script meltIce
{
	void run()
	{
		while(true)
		{
			melt(ComboAt(this->X, this->Y));
			melt(ComboAt(this->X+15, this->Y));
			melt(ComboAt(this->X, this->Y+15));
			melt(ComboAt(this->X+15, this->Y+15));
			Waitframe();
		}
	}
	
	void melt(int loc)
	{
		for(int q = 0; q <= MAX_ICE_LAYER; ++q)
		{
			mapdata scr = Game->LoadTempScreen(q);
			if(scr->ComboT[loc] == CT_ICE)
				--scr->ComboD[loc];
		}
	}
}

Could probably be done more efficiently, but that would get the job done. Just assign the lweapon script in the item editor to the weapon you want to freeze/melt the water/ice


  • Bagu and SparksTheUnicorn like this

#3 Peteo

Peteo

    Back in Business!

  • Members
  • Real Name:Pete
  • Location:Finland

Posted 21 January 2020 - 02:58 PM

This works nicely. And the combo next to water doesn't even have to be a script1 combo (unless I want to be able to melt the ice). The water will still turn to the next combo on the list, which is actually really good if I want to make ice blocks that melt quickly by combo cycling it through a nice animation and then back to the water combo. :)

 

Thank you.



#4 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 21 January 2020 - 11:28 PM

This works nicely. And the combo next to water doesn't even have to be a script1 combo (unless I want to be able to melt the ice). The water will still turn to the next combo on the list, which is actually really good if I want to make ice blocks that melt quickly by combo cycling it through a nice animation and then back to the water combo. :)

 

Thank you.

Aye, though if you want both a freezing and a melting, and want something to be able to be melted then frozen again then melted again, you'd want them next to each other. Unless you want complicated combo cycling both ways for every single combo XD



#5 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 01 February 2020 - 03:55 PM

Such a brillant idea.
I will overwork my current water dungeon, to use this function in many screens.


Edited by Bagu, 01 February 2020 - 03:55 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users