PDA

View Full Version : Controllable jump height



cbailey78
12-06-2016, 06:20 PM
Hello devs, It came to my mind that would be a good idea as a quest rule or Roc's Feather that has an option to have a controllable jump height that link will jump at the item's max height as long as the item button is held. Like super mario bros, metroid, etc. Think of playing a metroid like quest when you have a very high jump boots to get to higher places, but when you are in a room where there is a low ceiling with spikes that you have to avoid hitting the ceiling spikes while your jumping from platforms / blocks. Just a thought if it's possible to implement. Thanks.

ZoriaRPG
12-06-2016, 11:31 PM
The issue here, is that you are referencing the types of games that are typically sideview quests, and almost all sideview quests use scripted jumping, whereby it would be trivial to do this type of jump mechanic.

Something like this could work:




ffc script RocJumpTimed{
void run(int timermax, int frames){
int timer;
while ( ( ( GettEquipmentA == I_ROCSFEATHER && Link->InputA ) || ( GetEquipmentB == I_ROCSFEATHER && Link->InputB ) ) && timer <= maxtimer ) {
timer++;
if ( timer % frames == 0 ) Link->Jump += height;
Waitframe();
}
this->Data = 0; this->Script = 0; Quit();
}
}

item script RocMario{
void run(int maxtimer, int frames){
int ff[]=RocJumpTimed";
ffc f; int fff = Game->GetFFCScript(ff);
for (int q = 1; q <= 32; q++){
f = Screen->LoadFFC(q);
if ( q-> Script == fff ) Quit();
}
int a[8]={maxtimer,frames};
RunFFCScript(fff,a);
}
}


Making the height of Ric' s Feather scale based on the number of frames of input could be an item editor option, but I doubt it would see much use...?