Giter Club home page Giter Club logo

Comments (3)

Selenyhr avatar Selenyhr commented on June 21, 2024 1

I'm having a bit of trouble seeing how you are using Dialogue Manager with the given example, and it seems like more general Godot behavior on how signals work.

This said, signals in Godot are not emitted through a global bus. When a signal is emitted, only objects that connected the specific emitting instance will receive the signal.

So in your case, you would need to connect the signal from your World node before you can attempt processing it. You can connect signals through the editor, or by using the drop_pot.connect() method. There is a great official tutorial on how to do this.

I will also add that if you want to use an event bus so that you can receive signals from anywhere within your code from anywhere else, without having to go through specific Node instances, there is a great tutorial by GDQuest that explains how to set up a basic yet function events bus system. Note that this tutorial was made for Godot 3, so the code will need to be adjusted to the new way of doing things :)

If my analysis of your issue was wrong, don't hesitate to correct me.

from godot_dialogue_manager.

Runkli avatar Runkli commented on June 21, 2024

Maybe one solution would be to have a reference to the local node in the top node, and to call the signal through the reference in the top node?

from godot_dialogue_manager.

nathanhoad avatar nathanhoad commented on June 21, 2024

Assuming a node is available in the current scene (eg. @onready var some_node: Node = %SomeNode) and it has a signal on it called did_a_thing then you can call it in the dialogue like this: do some_node.did_a_thing.emit(). It's then up to you to make sure the right other nodes are connected to that signal of that instance.

from godot_dialogue_manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.