Skip to content

A couple minor homing fixes #3

@russmatney

Description

@russmatney

Hey there! Very cool library, thanks for putting it together and open-sourcing it!

I ran into a few crashes integrating it yesterday/this morning, I thought I'd share the commit in my repo: russmatney/dino@56fbfc2.

I can create a proper PR if you want, this was just a lower-lift share, and maybe you prefer a different solution and/or can get to it sooner.

I prefer to do more things from code in general, which might explain why I hit some of these. For now I'm creating bullet and spawn patterns in an autoloaded scene, then updating and firing bullets from enemy instances this:

func fire(target):
    Spawning.change_property("bullet", "bulletPattern1", "homing_target", target.get_path())
    Spawning.change_property("bullet", "bulletPattern1", "homing_steer", 100)
    Spawning.change_property("bullet", "bulletPattern1", "homing_duration", 3)
    Spawning.spawn(self, "spawnPattern1")

This usage seems reasonable to me. It feels like the lib may expect some homing setup is expected to happen in _ready(), but it's too late if we decide afterwards that a bullet should be homing. Maybe I should just create the bullet and spawn pattern in the code as well, to resolve that?

--

I also spent a bit trying to figure out why some spawns never fired, and eventually figured out that nothing fires unless a spawner is in a positive x and y position. Moving a spawner left of the y axis or above the x axis results in no bullets at all. Maybe this is just a bug on my end? I dug into it briefly, but wasn't able to find a clear reason/solution for this yet.

Let me know what you think and if you'd like an actual PR!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions