Dark-Peace / BulletUpHell

Most feature-packed Bullethell Engine. All in 1 plugin for Godot 3 & 4.
https://bottled-up-studio.itch.io/godot-bullethell-plugin
MIT License
297 stars 15 forks source link

Spawn Point can't assign TriggerContainer #1

Closed Keryx42 closed 1 year ago

Keryx42 commented 1 year ago

First of thank you very much for creating this amazing addon. Im just in the beginning of implementing it but I'm realy impressed about the functionality :)

Where does the problem occour

Main Branch

What Godot version was used

v4.0.2.stable.official [7a0977ce2]

Problem

I can't assign a TriggerContainer to the Spawnpoint

I took a look in the BuHSpawnpoint.gd

Im not familiar with the _get_property_list() syntax as I'm usually using @export_node_path(SomeClass) for those kind of things. https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_exports.html#nodes

I happened to see a similar behaviour when you tried to assign a class that was not of the correct type. So maybe this needs also to be written different int the _get_property_list() return array. In the docs I couldn't find much explanation about this topic https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/object_class.html#binding-properties-using-set-get-get-property-list

I hope this helps you a little bit :)

func _get_property_list() -> Array:
    return [
        {
            name = "active",
            type = TYPE_BOOL,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "auto_pattern_id",
            type = TYPE_STRING,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "shared_area_name",
            type = TYPE_STRING,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "rotating_speed",
            type = TYPE_FLOAT,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "pool_amount",
            type = TYPE_INT,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "Autostart & Triggering",
            type = TYPE_NIL,
            hint_string = "auto_",
            usage = PROPERTY_USAGE_GROUP
        },{
            name = "auto_start_on_cam",
            type = TYPE_BOOL,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "auto_start_after_time",
            type = TYPE_FLOAT,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "auto_start_at_distance",
            type = TYPE_FLOAT,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "auto_distance_from",
            type = TYPE_NODE_PATH,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "Advanced Triggering",
            type = TYPE_NIL,
            hint_string = "trigger_",
            usage = PROPERTY_USAGE_GROUP
        },{
            name = "trigger_id",
            type = TYPE_NODE_PATH,
            usage = PROPERTY_USAGE_DEFAULT
        },{
            name = "Random",
            type = TYPE_NIL,
            hint_string = "r_",
            usage = PROPERTY_USAGE_GROUP
        },
        { name = "r_randomisation_chances", type = TYPE_FLOAT,
            hint = PROPERTY_HINT_RANGE, hint_string = "0, 1", usage = PROPERTY_USAGE_DEFAULT },
        { name = "r_active_chances", type = TYPE_FLOAT,
            hint = PROPERTY_HINT_RANGE, hint_string = "0, 1", usage = PROPERTY_USAGE_DEFAULT },
        { name = "r_shared_area_choice", type = TYPE_STRING, usage = PROPERTY_USAGE_DEFAULT },
        { name = "r_rotating_variation", type = TYPE_VECTOR3, usage = PROPERTY_USAGE_DEFAULT },
        { name = "r_pattern_choice", type = TYPE_ARRAY, usage = PROPERTY_USAGE_DEFAULT },
        { name = "r_start_time_choice", type = TYPE_STRING, usage = PROPERTY_USAGE_DEFAULT },
        { name = "r_start_time_variation", type = TYPE_VECTOR3

Example for reproducing the problem

https://user-images.githubusercontent.com/22496462/232871153-f5cd2258-d430-456f-bc6c-71817aa52ca9.mov

Dark-Peace commented 1 year ago

Sorry for the late response, I didn't get a notification.

Yeah I used get_property_list as it was the only way to do it in G3.4 .

Triggers need some rework anyway so I will fix that, except I don't really have the time, I wasn't planning on working on it for the next 2 months... So I can't tell when this will be fixed.

Thank you for the kind words ^^

Dark-Peace commented 1 year ago

Hi @Keryx42 , the 4.2 release should've fixed it

Keryx42 commented 1 year ago

Thats great news :), thank you so much!