LA style sideview ladders?
#1
Posted 20 March 2011 - 07:57 PM
#2
Posted 20 March 2011 - 07:59 PM
#3
Posted 20 March 2011 - 08:23 PM
{
void run()
{
int link_lastdirection = Link->Dir;
while(true)
{
if(Link->Dir == DIR_UP && Screen->isSolid(Link->X,Link->Y - 16))
{
Waitdraw();
Link->Dir = link_lastdirection;
}
link_lastdirection = Link->Dir;
Waitframe();
}
}
}
#4
Posted 20 March 2011 - 09:29 PM
#5
Posted 20 March 2011 - 11:46 PM
int SaveX;
int SaveY;
int SaveS;
int SaveM;
bool WasOnLadder = false;
bool HookGrab(){
int HSFor;
for(HSFor = 1; HSFor <= Screen->NumLWeapons(); HSFor++){
lweapon HSCheck = Screen->LoadLWeapon(HSFor);
if(HSCheck->ID == LW_HOOKSHOT && Screen->ComboT[ComboAt (HSCheck->X, HSCheck->Y)] == CT_HSGRAB || Screen->ComboT[ComboAt (HSCheck->X+15, HSCheck->Y)] == CT_HSGRAB || Screen->ComboT[ComboAt (HSCheck->X, HSCheck->Y+15)] == CT_HSGRAB || Screen->ComboT[ComboAt (HSCheck->X+15, HSCheck->Y+15)] == CT_HSGRAB){
return(true);
}
}
return(false);
}
bool OnLadder()
{
if(Screen->ComboT[ComboAt (Link->X, Link->Y+8)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X+15, Link->Y+8)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X, Link->Y+17)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X+15, Link->Y+17)] == CT_SCRIPT1){
return(true);
}
return(false);
}
bool OnLadderDown()
{
if(Screen->ComboT[ComboAt (Link->X, Link->Y+8)] != CT_SCRIPT1 && Screen->ComboT[ComboAt (Link->X+15, Link->Y+8)] != CT_SCRIPT1 && (Screen->ComboT[ComboAt (Link->X, Link->Y+17)] == CT_SCRIPT1 || Screen->ComboT[ComboAt (Link->X+15, Link->Y+17)] == CT_SCRIPT1)){
return(true);
}
return(false);
}
bool isLSolidHorz(int y)
{
int x;
for(x=Link->X; x<=Link->X+16; x+=8)
{
if(x==Link->X+16) x--;
if(Screen->isSolid(x, y)) return(true);
}
return(false);
}
bool isFiringHS(){
int HSFor;
for(HSFor = 1; HSFor <= Screen->NumLWeapons(); HSFor++){
lweapon HSCheck = Screen->LoadLWeapon(HSFor);
if(HSCheck->ID == LW_HOOKSHOT){
return(true);
}
}
return(false);
}
bool isJumping(){
if((GetEquipmentA() == I_ROCSFEATHER && Link->InputA == true) || (GetEquipmentB() == I_ROCSFEATHER && Link->InputB == true) || Link->Jump > 1){
return(true);
}
return(false);
}
global script Slot2{
void run(){
while(true){
if(Game->GetCurDMapScreen()!=SaveS || Game->GetCurDMap()!=SaveM){
if(Link->Action==LA_SCROLLING) Waitframes(49);
SaveX=Link->X;
SaveY=Link->Y;
}
if(OnLadder() == true && HookGrab() == false && isJumping() == false){
if(WasOnLadder == false){
Link->Jump = 1;
if(OnLadderDown()){
Link->Y++;
SaveY = Link->Y;
}
}
else{
Link->Jump = 0;
}
if(!isFiringHS()){
if(Link->InputUp == true && !isLSolidHorz(Link->Y+7)){
SaveY--;
}
else if(Link->InputDown == true && !isLSolidHorz(Link->Y+16)){
SaveY++;
}
if(Link->InputLeft == true && !Screen->isSolid(Link->X-1, Link->Y+8) && !Screen->isSolid(Link->X-1, Link->Y+15)){
SaveX--;
}
else if(Link->InputRight == true && !Screen->isSolid(Link->X+16, Link->Y+8) && !Screen->isSolid(Link->X+16, Link->Y+15)){
SaveX++;
}
}
Link->X = SaveX;
Link->Y = SaveY;
WasOnLadder = true;
}
else{
if(WasOnLadder == true){
Link->Jump = 0;
WasOnLadder = false;
}
SaveX = Link->X;
SaveY = Link->Y;
}
SaveS=Game->GetCurDMapScreen();
SaveM=Game->GetCurDMap();
Waitframe();
}
}
}
item script Roc{
void run(){
if(OnLadder() == true){
Link->Jump = 3;
}
}
}
It uses Script 1 combos as ladder combos. Using the Roc's Feather while on the ladder causes Link to let go unless the Roc script is attached to it..
Edited by Isdrakthül, 26 July 2011 - 09:18 AM.
#6
Posted 19 July 2011 - 07:41 PM
#8
Posted 19 July 2011 - 08:04 PM
I'm going with that ladder over this one not just for being a flag, but because it prevents jumping at all when in use, and it'll be easier to make Link always face downward, no matter if he's going up or down (which is what I"m going for.)
Edited by King Aquamentus, 19 July 2011 - 08:20 PM.
#9
Posted 19 July 2011 - 08:38 PM
#11
Posted 19 July 2011 - 09:04 PM
#12
Posted 19 July 2011 - 09:33 PM
I was giving an alternative to scripting that can accomplish the same goal. Just because it can be done with scripts doesn't mean it needs to be...
Which is not the case, here. We do not want to warp to create the effect. We want it on hand without having to copypaste screens. I'm building a tileset for members here, and asking them to make a double of a screen is not something I am going to do.
Isdrakthul, why would your script only name itself halfway down? I think there's something wrong with it. Besides, assembled like that, it doesn't combine right with other global scripts. Additionally, in LA, using the rocs feather did *not* cause Link to let go. It just bumped him up a little (like using the rocs feather in ZC when you're stuck in a wall.)
Edited by King Aquamentus, 19 July 2011 - 09:44 PM.
#13
Posted 21 July 2011 - 10:00 AM
I'll work on making this LA-like when I get the chance.
EDIT: Could you provide a link to a video of the Roc's Feather being used on an LA ladder? I haven't been able to find one.
Edited by Isdrakthül, 21 July 2011 - 01:20 PM.
#14
Posted 21 July 2011 - 10:32 AM
Edited by Cukeman, 21 July 2011 - 10:35 AM.
#15
Posted 23 July 2011 - 01:54 PM
Edited by King Aquamentus, 23 July 2011 - 02:06 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users