This script adds a double jump mechanic, but it only works if the player has the Quick Revive perk.
A simple way to make gameplay more dynamic by giving Quick Revive an extra ability.
This isn't perfect, but it works. I'm working on a project with improvements to bring together several scripts that improve the gameplay and make it more fun. Thanks for reading this.
install: 1 - create a file in .gsc and paste the script below. (sorry, i can't use link)
2 - Place the .gsc file in your scripts folder.
SCRIPT:
init()
{
for(;;)
{
level waittill("connected", player);
player thread double_jump();
}
}
double_jump()
{
self endon("disconnect");
self notifyOnPlayerCommand("jump_button_pressed", "+gostand");
self.jumps_left = 2;
self thread reset_pulo_timer();
for(;;)
{
self waittill("jump_button_pressed");
// Verifica se tem o perk revive
if(self HasPerk("specialty_quickrevive"))
{
if(self.jumps_left > 0)
{
self SetVelocity(self GetVelocity() + (0, 0, 300));
self.jumps_left--;
}
}
}
}
reset_pulo_timer()
{
self endon("disconnect");
for(;;)
{
wait 1.8; // time to reset
self.jumps_left = 2;
}
}
Thanks again!!