IncomingPad.gd 407 B

12345678910111213141516171819202122
  1. extends JumpPad
  2. onready var pair = $"../JumpPadOut"
  3. func _init():
  4. anitime = 0.5
  5. func _on_Area_body_entered(body):
  6. #print(body.name+" entered JUMPZONE")
  7. if body.name=="Player":
  8. if !pair.will_do_it:
  9. take_responsibility()
  10. body.flycrazy = true
  11. pl = body
  12. body.flyspeed = -vec
  13. accelerate(pl,"restore_player", body.flyspeed, Vector3(0,0,0))
  14. func restore_player():
  15. pl.flycrazy=false