Hey at the moment I finished the intro, but I’m trying to access the attack hitTime of a specific attack… but I’m stuck:
I thought i could simply access it by making a hitTime variable for the function that gets the attack’s hitTime:
//inside the project.playerAttack function
this.hitTime = player.attackName.hitTime;
and I tried to set the hitCooldown to the function’s hitTime variable code:
//inside the player cooldown condition, in line 484
player.hitCooldown = (project.playerAttack.hitTime||maxHitCooldown);
I scrapped that idea and tried this instead
//inside the player cooldown condition, in line 484
player.hitCooldown = (
project.PLAYER_ATTACKS[project.playerAttack.attackName].hitboxes.hitTime||player.maxHitCooldown);
It didn’t work as I hoped.
I’m just wondering if you guys know how to access the specific attack’s hitbox variables.
Edit: I did learn I could access the function’s variables, so i tried:
//inside the project.playerAttack function
this.hitTime = project.PLAYER_ATTACKS[player.attackName].hitboxes.hitTime;
And tried to set the player hitCooldown to the playerAttack’s hitTime variable
//inside the player cooldown condition, in line 484
player.hitCooldown = (project.playerAttack.hitTime||player.maxHitCooldown);
It came as undefined… so all I have to do now is figure out how to access the PLAYER_ATTACKS’s specific attack object and get its hitbox’s hitTime variable…