Skip to content

Calling play() or set_parameter() on an Event that contains an Event instrument with a parameter throws an error #412

@nstgeorge

Description

@nstgeorge

As an example of this issue, I have a footstep event that contains a water_footstep Event instrument with a parameter for WaterDepth. This parameter shows up as expected in the Godot editor, but each time I call play() or set_parameter() on the event emitter, I have the following error message:

E 0:00:03:289   player_controller.gd:242 @ make_footstep_sound(): Cannot set parameter  to value 0.000000void __cdecl godot::FmodEvent::set_parameter_by_name(const class godot::String &,float) constsrc\studio\fmod_event.cpp69
  <C++ Source>  core/variant/variant_utility.cpp:1024 @ push_error()
  <Stack Trace> player_controller.gd:242 @ make_footstep_sound()
                player_controller.gd:168 @ _handle_ground_physics()
                player_controller.gd:291 @ _physics_process()

This happens even if the set_parameter() call is not on the referenced parameter.

When this error appears, the audio still plays, but the referenced parameter does not get updated if I try to update it. Sometimes the game will crash when the event is triggered, but when this happens, there is no error message.

I'm not 100% certain that this is caused by the referenced parameter, but it does seem likely given that there is another "normal" parameter on this Event, and if I remove the Event instrument, things work normally. It seems like the reference isn't resolved correctly since the parameter name that would be in the error message is missing.

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