By any chance, are you using a pit script in your quest? If so, you'd need to make it compatible with it as well. (That would look awesome)
I believe I am using Moosh's pit scriptm yes. Thank you for the reminder, I will have to do that.
Also, so while the Hookshot thing worked well enough for a bit, it had two big problems that I just couldn't handle. Those being that I couldn't use the normal Hookshot (I had to use a scripted one), and that I only got half the effect I was after (I had Link hovering after hookshoting to a grapple point, but not when walking over a pit/damage combo). So I decided to start again from scratch. Fast forward a few hours later to now, and I just completed the first script that was made almost entirely from scratch.
Of course it still does have some issues (for some reason direct and sensitive warps are still activated if link enters them from the sides, when it should instead be activated the hover boots), but I am still pretty proud of this.
SO BEHOLD, OCARINA OF TIME STYLE HOVER BOOTS:
////////////////////////////////
/////OoT Hover Boots Script/////
///// V1.0 /////
///// By SparksTheUnicron /////
///// 06/09/2020 /////
////////////////////////////////
//NOTE: The method for detecting if Link is on a combo flagged as hoverable (meaning Link's Boots will activate when on said Combo) is an edited version of the method used by Moosh's pit script for detecting if link is on a pit
//NOTE: This script requires stdCombos.zh, std.zh, and stdExtra.zh
//import "std.zh"
//import "stdCombos.zh"
//import "stdExtra.zh"
const int hoverDuration = 50; //Time, in frames, that the hover effect lasts. Set to 45 for the default hover boot length. This should be set to the same value as the hover duration in the items attributes
const int hoverID = 92; //Item ID of the hover boots
const int HoverFlag = 109; //combo flag that causes link to start hovering
const int rechargeTime = 20; //time, in frames, that link must wait before he can hover again after landing
bool hover_charged = true; //the hover boots can be used
bool hover_activate=false; //the hover boots have been triggered
bool jumped=false; //has the initial jump occured
bool chargingUp=false;
int hovWidth = 2;
int hovHeight = 2;
int hovX;
int hovY;
int hovComb;
int hoverTimer = 0;
int rechargeTimer = 0;
void StopHover()
{
hoverTimer=hoverDuration;
hover_activate=false;
jumped=true;
hover_charged=true;
}
void OoTStartUp() //call before while(true) to make sure all variables are set correctly on start up and respawn
{
hoverTimer = hoverDuration; //reset hover timer
hover_activate=false; //stop hovering
hover_charged=true; //hover is available
jumped=true;
}
void OoTHoverBoots()
{
if((Link->Item[hoverID]) && hover_charged && OnHoverFlag()==1)
{
hover_activate=true; //signals the boots are active
jumped=false;
hover_charged=false; //we have used up our charge
hoverTimer = hoverDuration; //sets the hover timer to be max
}
if(hover_activate)
{
if(!jumped)
{
Link->Z++;
Link->Z++;
jumped=true;
}
if(hoverTimer<=0)
{
StopHover();
}
else
{
hoverTimer--;
}
}
}
int OnHoverFlag()
{
int total;
for(int hovx=0; hovx<=1; hovx++)
{
for(int hovy=0; hovy<=1; hovy++)
{
hovX = Floor(Link->X+7-hovWidth/2+(hovWidth-1)*hovx)+1; //check the corners of links hitbox to see if he touches a hover activating combo
hovY = Floor(Link->Y+11-hovHeight/2+(hovHeight-1)*hovy)+1;
if((Screen->ComboF[ComboAt(hovX, hovY)]==HoverFlag))
{
total |= 1<<(1+(hovx+hovy*2));
}
}
}
if(total>0)
{
return 1;//(total>>1);
}
else
{
return -1;
}
}
////EXAMPLE GLOBAL SCRIPT////
global script OoTHoverGlobal{
void run(){
OoTStartUp();
while(true){
//random functions
//more random functions
OoTHoverBoots();
Waitframe();
}
}
}
Edited by SparksTheUnicorn, 09 June 2020 - 01:40 PM.