![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | J0lt3n |
I wanna attach a particle to my character’s double jump but i’m stuck at showing and hiding the effect when the character has jumped on its second jump. I’ve tried many different ways to do this but none of them worked, the closest I’ve gotten was this script here. If you want to suggest a whole different or better script for it then please do! Thanks!
if Input.is_action_just_pressed("ui_up"):
if on_ground == true:
vel.y = JumpP
HDJ = false
on_ground = false
elif on_ground == false && HDJ == false:
vel.y = JumpP
HDJ = true
if on_ground == false && HDJ == false && Input.is_action_just_pressed("ui_up"):
DJ = DJ + 1
if DJ == 2:
$Double.visible = $Double.visible
if on_ground == true:
DJ = 0
else:
$Double.visible = not $Double.visible