Switch Hook
#1
Posted 09 January 2012 - 02:09 AM
Switch Hook on Zelda Wiki
#2
Posted 27 January 2012 - 02:17 PM
#3
Posted 15 April 2012 - 12:58 PM
#4
Posted 15 April 2012 - 05:44 PM
store x,y = lnk xy
linkxy = comboxy
comboxy = store xy.
but i dont know how you can detect collisions with the hookshot.
#5
Posted 15 April 2012 - 05:52 PM
Suggested algorithm:
* (Possibly) re-create the hookshot chain/head by script
* If the switch hook lweapon collides with an enemy, move Link and the enemy towards each other (and disable Link's collision checking) until they reach the other's original position
* Do the same for combos with a certain flag (SCRIPT1), but change them to the undercombo and place an FFC for the moving combo, and set the combo formerly under Link to the combo you move
#6
Posted 26 April 2012 - 08:19 AM
ffc script new_script
{
void run()
{
bool flag = false;
while(true)
{
flag = false;
int i;
for(i=1; i<=Screen->NumLWeapons(); i++)
{
lweapon wpn = Screen->LoadLWeapon(i);
if(wpn->ID==LW_BRANG && ComboAt(this->X,this->Y) == 10 && flag == false);
{
flag = true;
this->Data = 100;
ComboAt(Link->X,Link->Y) == 10;
Link->X = this->X;
Link->Y = this->Y;
}
}
Waitframe();
}
}
}
#7
Posted 26 April 2012 - 12:37 PM
Try ComboD[number of combo under Link] and set this.
However since it is an ffc why not just change ffc position and switch it with Link's that should avoid weird behaviour at edges of a combo because of grid restrictions. Also i think it wont look nice why not move Link toward where the ffc was(by interpolation of start and endpoint using waitframes to get a nice animation)?(however i did not try the script so those are just blind suggestions)
Edited by aaa2, 26 April 2012 - 12:41 PM.
#8
Posted 26 April 2012 - 01:34 PM
#9
Posted 26 April 2012 - 01:39 PM
Edited by ABH15, 26 April 2012 - 01:39 PM.
#10
Posted 26 April 2012 - 01:49 PM
#11
Posted 04 May 2012 - 07:44 AM
this works but it doesnt switch until the hook has returned to link any ideas why?
ffc script new_script
{
void run()
{
bool flag = false;
while(true)
{
flag = false;
int i;
int storeX = 0;
int storeY = 0;
int storeat = 0;
for(i=1; i<=Screen->NumLWeapons(); i++)
{
lweapon wpn = Screen->LoadLWeapon(i);
if(wpn->ID==LW_HOOKSHOT && Collision(this, wpn) && flag == false);
{
flag = true;
storeat = Screen->ComboD[ComboAt(Link->X,Link->Y)];
Screen->ComboD[ComboAt(Link->X,Link->Y)] = Screen->ComboD[ComboAt(this->X,this->Y)];
Screen->ComboD[ComboAt(this->X,this->Y)] = storeat;
storeX = Link->X;
Link->X = this->X;
this->X = storeX;
storeY = Link->Y;
Link->Y = this->Y;
this->Y = storeY;
}
}
Waitframe();
}
}
}
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users

