Hi
Could someone write me a script that when player stands on a specific combo
then the player can jump?
Posted 18 July 2016 - 09:11 PM
Hi
Could someone write me a script that when player stands on a specific combo
then the player can jump?
Posted 18 July 2016 - 10:50 PM
I'm guessing the following:
ffc script Jump_While_On_Combo{ void run(){ while(Link->X == this->X + 8 && Link->Y == this->Y + 8){ if (Link->PressA){ Link->Jump = 4; Waitframes(15); } } } } If Link is standing on the center of this FFC and presses A, he'll jump. You can change the value of 4 to whatever you want, with a high number being a higher jump. You could also change the number next to Waitframes if you want to change the timing of how long the script waits to run again.
Posted 18 July 2016 - 11:12 PM
ffc script ComboJump { void run(int combo, int jump_height) { while (true) { if (ComboAt(Link->X + 8, Link->Y + 8) == combo && Link->Z == 0 && Link->PressEx1) { if (jump_height > 0) { Link->Jump = jump_height; } else { Link->Jump = 2; } } Waitframe(); } } }D0 is combo number, D1 is jump height (defaults to 2 if nothing is entered). Emphatically does not work in sideview.
Posted 18 July 2016 - 11:14 PM
I'm guessing the following:
ffc script Jump_While_On_Combo{ void run(){ while(Link->X == this->X + 8 && Link->Y == this->Y + 8){ if (Link->PressA){ Link->Jump = 4; Waitframes(15); } } } } If Link is standing on the center of this FFC and presses A, he'll jump. You can change the value of 4 to whatever you want, with a high number being a higher jump. You could also change the number next to Waitframes if you want to change the timing of how long the script waits to run again.
It compiles and it somehow does not work at all , it dont even show when i use Show Current FFC on screen
Posted 18 July 2016 - 11:35 PM
That script will immediately quit if Link isn't standing exactly on the FFC the first frame he enters the room. And if he is, it'll immediately freeze the game instead.
Try this:
ffc script ComboJump { void run(int combo, int jump_height) { while (true) { if (ComboAt(Link->X + 8, Link->Y + 8) == combo && Link->Z == 0 && Link->PressEx1) { if (jump_height > 0) { Link->Jump = jump_height; } else { Link->Jump = 2; } } Waitframe(); } } }D0 is combo number, D1 is jump height (defaults to 2 if nothing is entered). Emphatically does not work in sideview.
Hm does not jump
Posted 18 July 2016 - 11:43 PM
Posted 18 July 2016 - 11:46 PM
You press Ex1 to jump. If you wanted it to act more like a trampoline instead, you should have specified.
I changed it to B button but i wont jump at all , i see the script name at screen when i use show current FFC on screen
Posted 19 July 2016 - 12:52 AM
Posted 19 July 2016 - 01:32 AM
You didn't set D0 to the combo number. That's important.
Posted 19 July 2016 - 01:57 AM
Posted 19 July 2016 - 02:01 AM
The script reads combo position. I could change it to the number from the combo table itself, though. Then you could put any number of those combos in the room with only one copy of the script.
Yes that would be nice of you
Posted 19 July 2016 - 02:09 AM
ffc script ComboJump { void run(int combo, int jump_height) { while (true) { if (Screen->ComboD[ComboAt(Link->X + 8, Link->Y + 8)] == combo && Link->Z == 0 && Link->PressEx1) { Game->PlaySound(SFX_JUMP); if (jump_height > 0) { Link->Jump = jump_height; } else { Link->Jump = 2; } } Waitframe(); } } }YUMP SOUND
Edited by Lejes, 19 July 2016 - 02:39 AM.
Posted 19 July 2016 - 02:20 AM
ffc script ComboJump { void run(int combo, int jump_height) { while (true) { if (Screen->ComboD[ComboAt(Link->X + 8, Link->Y + 8)] == combo && Link->Z == 0 && Link->PressEx1) { if (jump_height > 0) { Link->Jump = jump_height; } else { Link->Jump = 2; } } Waitframe(); } } }
Thank you
it works , could you add so it plays the jump sound also?
Posted 19 July 2016 - 02:40 AM
Posted 19 July 2016 - 02:46 AM
Check the post again, edited it in.
Thank you for your help Lejes
Now i say goodbye to roc"s feather
0 members, 0 guests, 0 anonymous users