Add a script to level_scene, then export player variables:
extends Node2D
@export var player_1 : CharacterBody2D = null
@export var player_2 : CharacterBody2D = null
# You get the idea.
Set player_1 and player_2 via the inspector.
Now you can process the players’ physics from the parent node:
func _physics_process(delta : float)->void:
if not player_1.is_on_floor():
player_1.velocity += get_gravity() * delta
if not player_2.is_on_floor():
player_2.velocity += get_gravity() * delta
# Hopefully you get the idea.
That’s how you could do it. But I don’t understand why would want to. Could you share why you think this is necessary? I suspect there might be a XY problem situation going on here.
i want to make a bunch of little minigames with different types of actions and controls (platformer, topdown, racing mechanics etc.) so i assumed that it would be more convenient to write each of levels features in level script instead of having all of this different control variations in players script