Skip to content

can follow.unit_offset be > 1?  #24

@cleartocode

Description

@cleartocode

going through this code i faced with the issue that enemies were still shooting for ever even when they were off screen, this fixed the issue for me:

func _process(delta):
	follow.offset += speed * delta
	position = follow.global_position
	if follow.unit_offset == 1:    # changed  follow.unit_offset > 1 to follow.unit_offset == 1
		queue_free()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions