You could use a static variable to keep track of how many duplicates there are
static var count_duplicates: int = 0
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("mitosis") and count_duplicates < 1000:
count_duplicates += 1
var copy = duplicate()
add_sibling(copy)
Hey there! This is a community forum! People here donate their free time to try and help out others! With that said, please do not spam / bother someone if they don’t reply to you. They’re not being paid in any way to help you out.
Yes you could multiply the offset by count_duplicates, but I don’t think it would solve the issue there still may be a duplicate that happens to be in the same position.