![icon_heh.gif](http://www.purezc.com/forums/public/style_emoticons/default/icon_heh.gif)
Now the meat:
I finished your script and introduced a few. new. never. seen. before.awesome. features! omfgwhatdoesthatdo!? Four words : Quartic - Vertex - Dimensional - Bannana. !!! ...Just kidding. =\
Actually what I've introduced into ZScript are : Singular and Tiered F***ing Activation of tehFlags, or SATFAT for short.
![icon_razz.gif](http://www.purezc.com/forums/public/style_emoticons/default/icon_razz.gif)
![icon_slycool.gif](http://www.purezc.com/forums/public/style_emoticons/default/icon_slycool.gif)
There is weird bug I'm working out atm, but the Tiered part will be available via FFC script shortly.
OK, now that I am done butchering the English language, here is the code:
CODE
// Fill these in with the start and ending ID of the tiles used by the custom weapon sprites!!
// Example: CIT98 = 3400; CIT98E = 3407; //Thus the animation for this weapon would be 8-frames starting at tile #3400.
// Got it? Good.
const int CIT98 = 0; const int CIT98E = 0;
const int CIT99 = 0; const int CIT99E = 0;
const int CIT100 = 0; const int CIT100E = 0;
const int CIT101 = 0; const int CIT101E = 0;
const int CIT102 = 0; const int CIT102E = 0;
//CustomItemFlagTestCollisionDetectionWorkaround!:P
void doCIFTCDW(){
int x; int y;
lweapon lw_sprite;
int lw_num = Screen->NumLWeapons();
for(int l = lw_num; l>0; l--)
{
lw_sprite = Screen->LoadLWeapon(l);
x = lw_sprite->X; y = lw_sprite->Y;
if((lw_sprite->Tile>=CIT98&&lw_sprite->Tile<=CIT98E&&Screen->ComboF[ComboAt(x+8,y+8)]==98)||
(lw_sprite->Tile>=CIT99&&lw_sprite->Tile<=CIT99E&&Screen->ComboF[ComboAt(x+8,y+8)]==99)||
(lw_sprite->Tile>=CIT100&&lw_sprite->Tile<=CIT100E&&Screen->ComboF[ComboAt(x+8,y+8)]==100)||
(lw_sprite->Tile>=CIT101&&lw_sprite->Tile<=CIT101E&&Screen->ComboF[ComboAt(x+8,y+8)]==101)||
(lw_sprite->Tile>=CIT102&&lw_sprite->Tile<=CIT102E&&Screen->ComboF[ComboAt(x+8,y+8)]==102)){
doCISP(x,y); return; }
}
}
//CustomItemSwapProcedure!:P
void doCISP(int x, int y){
int target = ComboAt(x+8,y+8);
Screen->ComboF[target] = 5;
lweapon lw_sprite = Screen->CreateLWeapon(8);
lw_sprite->X=x;lw_sprite->Y=y;
Waitframe();if(lw_sprite->isValid())lw_sprite->DeadState = 0;
return;
}
global script slot2
{
void run()
{
while(true)
{
doCIFTCDW(); //Put this line in your global loop if you have another script!
Waitframe();
}
}
}
// Example: CIT98 = 3400; CIT98E = 3407; //Thus the animation for this weapon would be 8-frames starting at tile #3400.
// Got it? Good.
const int CIT98 = 0; const int CIT98E = 0;
const int CIT99 = 0; const int CIT99E = 0;
const int CIT100 = 0; const int CIT100E = 0;
const int CIT101 = 0; const int CIT101E = 0;
const int CIT102 = 0; const int CIT102E = 0;
//CustomItemFlagTestCollisionDetectionWorkaround!:P
void doCIFTCDW(){
int x; int y;
lweapon lw_sprite;
int lw_num = Screen->NumLWeapons();
for(int l = lw_num; l>0; l--)
{
lw_sprite = Screen->LoadLWeapon(l);
x = lw_sprite->X; y = lw_sprite->Y;
if((lw_sprite->Tile>=CIT98&&lw_sprite->Tile<=CIT98E&&Screen->ComboF[ComboAt(x+8,y+8)]==98)||
(lw_sprite->Tile>=CIT99&&lw_sprite->Tile<=CIT99E&&Screen->ComboF[ComboAt(x+8,y+8)]==99)||
(lw_sprite->Tile>=CIT100&&lw_sprite->Tile<=CIT100E&&Screen->ComboF[ComboAt(x+8,y+8)]==100)||
(lw_sprite->Tile>=CIT101&&lw_sprite->Tile<=CIT101E&&Screen->ComboF[ComboAt(x+8,y+8)]==101)||
(lw_sprite->Tile>=CIT102&&lw_sprite->Tile<=CIT102E&&Screen->ComboF[ComboAt(x+8,y+8)]==102)){
doCISP(x,y); return; }
}
}
//CustomItemSwapProcedure!:P
void doCISP(int x, int y){
int target = ComboAt(x+8,y+8);
Screen->ComboF[target] = 5;
lweapon lw_sprite = Screen->CreateLWeapon(8);
lw_sprite->X=x;lw_sprite->Y=y;
Waitframe();if(lw_sprite->isValid())lw_sprite->DeadState = 0;
return;
}
global script slot2
{
void run()
{
while(true)
{
doCIFTCDW(); //Put this line in your global loop if you have another script!
Waitframe();
}
}
}
Alestance, if you have any questions just ask away. I think the comment cleared up the confusion. Also, If you would like them to behave like normal zc flags, then I'll throw together a plug in for that.
Have fun!