Skip to content

u/SnowFox335

In this archive from Aug 2023 to Jan 2026

13
posts
10
comments
2
media
88
score
5 saved before deletion
SnowFox335Deleted · saved before deletion

This is how I got it working on the frogger game I'm doing for the 20 game challenge, it might not be 100% correct but it might help you...

func _on_body_entered(body):
if body is Player && !body.player_on_platform:
	attach_player()

func _on_body_exited(_body): if ignore_body_exit: ignore_body_exit = false else: if player_in_playable_area(): #inside x bounds detach_player() emit_signal("exited_platform")

func attach_player(): if player.get_parent() != platform: player.player_on_platform = true player.call_deferred("reparent",platform) ignore_body_exit = true

func detach_player(): if player.get_parent() != platform.owner: player.call_deferred("reparent", platform.owner) player.player_on_platform = false

func _on_changed_lanes():
if player.player_on_platform:
await get_tree().create_timer(0.1).timeout
detach_player()
1 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.