Remote attack!
Shoot it out and Link freezes, then control the weapon with the direction keys.
Quite nice, even if I do say so myself.
It's called ice because it's meant to be FFA's Ice spell.
Fraid I haven't written a freezing enemy bit yet though, maybe I'll be able to when I see how C-'s works.
Takes 4 inputs, they're noted on the script.Code:bool iceattack;
item script ice{
void run(){
iceattack = true;
}
}
global script slot_2{
void run(){
int icetile = 0; //Set the tile for your weapon here. Up, Down, Left, Right it should be on the tilepage.
int icecset = 0; //Set the CSet here
int icespeed = 2;//Set the speed here
int icedmg = 2; //Set the damage here
int icedir;
int icex; int icey;
while(true){
if(iceattack){
lweapon ice = Screen->CreateLWeapon(31);
icedir = Link->Dir;
ice->OriginalTile = icetile+icedir;
ice->Tile = icetile+icedir;
ice->NumFrames = 1;
ice->ASpeed = icespeed;
ice->CSet = icecset;
icex = 0; icey = 0;
if(icedir>1) icex = (((icedir-2)*2)-1)*16;
if(icedir<2) icey = ((icedir*2)-1)*16;
ice->X = Link->X+icex;
ice->Y = Link->Y+icey;
ice->Step = icespeed;
ice->Damage = icedmg;
Link->Action = LA_ATTACKING;
Waitframe();
while(ice->isValid()){
Link->Action = LA_FROZEN;
if(Link->InputUp) icedir = 0;
if(Link->InputDown) icedir = 1;
if(Link->InputLeft) icedir = 2;
if(Link->InputRight) icedir = 3;
ice->Dir = icedir;
ice->Tile = icetile+icedir;
ice->OriginalTile = icetile+icedir;
Waitframe();
}
Link->Action = 0;
iceattack = false;
}
Waitframe();
}
}
}
Otherwise pretty self explanitory.