GithubHelp home page GithubHelp logo

Comments (8)

nathanhoad avatar nathanhoad commented on May 23, 2024

I can't seem to replicate the looping that you're seeing with that dialogue snippet. The => END line should be encoded with the "end" jump and not null or "" anyhow.

If you open the matching tres file in the .godot/imported folder, can you paste in the contents?

from godot_dialogue_manager.

Joshua-Dugas avatar Joshua-Dugas commented on May 23, 2024

When the conversation ends, key is set to an empty string for me. This if clause causes it to loop around to the beginning instead of ending. Is this intentional? Commenting this if clause out fixes the issue for me

I am also having this problem. Just installed this addon today. Even the example dialog the addon comes loaded with loops indefinitely when I run the dialog in my scene. However when running with the 'Test Dialog' it seems to work fine.

from godot_dialogue_manager.

nathanhoad avatar nathanhoad commented on May 23, 2024

@Joshua-Dugas Can you paste the contents of the corresponding tres file in your .godot/imported folder?

from godot_dialogue_manager.

Joshua-Dugas avatar Joshua-Dugas commented on May 23, 2024

@Joshua-Dugas Can you paste the contents of the corresponding tres file in your .godot/imported folder?
Here is my file

[gd_resource type="Resource" script_class="DialogueResource" load_steps=2 format=3]

[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_resource.gd" id="1_em8tp"]

[resource]
script = ExtResource("1_em8tp")
using_states = PackedStringArray()
titles = {
"lizard_npc": "2"
}
character_names = PackedStringArray("Scrugz")
first_title = "2"
lines = {
"1": {
"id": "1",
"next_id": "2",
"text": "lizard_npc",
"type": "title"
},
"11": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "11",
"next_id": "12",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "If I were you I would get ready and go find those dogs!",
"text_replacements": Array[Dictionary]([]),
"translation_key": "If I were you I would get ready and go find those dogs!",
"type": "dialogue"
},
"12": {
"id": "12",
"mutation": {
"expression": Array[Dictionary]([{
"type": "variable",
"value": "has_met_scrugz"
}, {
"type": "assignment",
"value": "="
}, {
"type": "variable",
"value": "true"
}])
},
"next_id": "13",
"parent_id": "2",
"type": "mutation"
},
"13": {
"id": "13",
"is_snippet": false,
"next_id": "end",
"type": "goto"
},
"14": {
"id": "14",
"next_conditional_id": "16",
"next_id": "15",
"next_id_after": "16",
"type": "condition"
},
"15": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "15",
"next_id": "16",
"parent_id": "14",
"tags": PackedStringArray(),
"text": "You should probably get ready...",
"text_replacements": Array[Dictionary]([]),
"translation_key": "You should probably get ready...",
"type": "dialogue"
},
"16": {
"id": "16",
"is_snippet": false,
"next_id": "end",
"type": "goto"
},
"2": {
"condition": {
"expression": Array[Dictionary]([{
"type": "variable",
"value": "has_met_scrugz"
}, {
"type": "comparison",
"value": "=="
}, {
"type": "variable",
"value": "false"
}])
},
"id": "2",
"next_conditional_id": "14",
"next_id": "3",
"next_id_after": "13",
"type": "condition"
},
"3": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "3",
"next_id": "4",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "Oh no you are awake! I've got bad news bosssssss...",
"text_replacements": Array[Dictionary]([]),
"translation_key": "Oh no you are awake! I've got bad news bosssssss...",
"type": "dialogue"
},
"4": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "4",
"next_id": "5",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "It seems you accidentally drank that sleep potion on the table.",
"text_replacements": Array[Dictionary]([]),
"translation_key": "It seems you accidentally drank that sleep potion on the table.",
"type": "dialogue"
},
"5": {
"character": "",
"character_replacements": Array[Dictionary]([]),
"id": "5",
"next_id": "7",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "I know, I know! It looks just like your wine jug but I think I misplaced the wine and
accidentally filled your jug with the sleep potion from the shelf. Whoops!",
"text_replacements": Array[Dictionary]([]),
"translation_key": "I know, I know! It looks just like your wine jug but I think I misplaced the wine and
accidentally filled your jug with the sleep potion from the shelf. Whoops!",
"type": "dialogue"
},
"7": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "7",
"next_id": "8",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "Who am I!? I am your housekeeper and have been for years!",
"text_replacements": Array[Dictionary]([]),
"translation_key": "Who am I!? I am your housekeeper and have been for years!",
"type": "dialogue"
},
"8": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "8",
"next_id": "9",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "The nerve....",
"text_replacements": Array[Dictionary]([]),
"translation_key": "The nerve....",
"type": "dialogue"
},
"9": {
"character": "Scrugz",
"character_replacements": Array[Dictionary]([]),
"id": "9",
"next_id": "11",
"parent_id": "2",
"tags": PackedStringArray(),
"text": "Anyhow you have been out cold for months and the place is in disrepair.
Also all of your dogs got out...",
"text_replacements": Array[Dictionary]([]),
"translation_key": "Anyhow you have been out cold for months and the place is in disrepair.
Also all of your dogs got out...",
"type": "dialogue"
}
}
metadata/dialogue_manager_version = "2.31.0"

from godot_dialogue_manager.

nathanhoad avatar nathanhoad commented on May 23, 2024

@Joshua-Dugas That appears to be fine. Can you share the code you're using to run the dialogue in your scene?

from godot_dialogue_manager.

Joshua-Dugas avatar Joshua-Dugas commented on May 23, 2024

@nathanhoad sure thing!

extends Area2D

@export var dialogue_resource: DialogueResource
@export var dialogue_start: String = "lizard_npc"

func action() -> void:
	DialogueManager.show_example_dialogue_balloon(dialogue_resource, dialogue_start)

And here is the dialog script itself(I've tried without the double 'end' statements as well was just trying anything):

~ lizard_npc
if has_met_scrugz == false
	Scrugz: Oh no you are awake! I've got bad news bosssssss...
	Scrugz: It seems you accidentally drank that sleep potion on the table. 
	I know, I know! It looks just like your wine jug but I think I misplaced the wine and 
		accidentally filled your jug with the sleep potion from the shelf. Whoops!
	Scrugz: Who am I!? I am your housekeeper and have been for years!
	Scrugz: The nerve....
	Scrugz: Anyhow you have been out cold for months and the place is in disrepair. 
		Also all of your dogs got out...
	Scrugz: If I were you I would get ready and go find those dogs!
	set has_met_scrugz = true
=> END
else
	Scrugz: You should probably get ready...
=> END

from godot_dialogue_manager.

nathanhoad avatar nathanhoad commented on May 23, 2024

If you put a log inside action(), just before calling show_example_dialogue_balloon I'm going to guess that it will log each time the dialogue is "looping". My assumption is that the dialogue itself isn't looping but your action method is being run instantly once the dialogue finishes. Are you handling input via _unhandled_input?

from godot_dialogue_manager.

nathanhoad avatar nathanhoad commented on May 23, 2024

I'm closing this until there is reproducible as an actual bug.

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.