Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script is not a BTTask #111

Open
HexBlit opened this issue May 20, 2024 · 9 comments
Open

Script is not a BTTask #111

HexBlit opened this issue May 20, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@HexBlit
Copy link

HexBlit commented May 20, 2024

I am using v1.0.2, installed via AssetLib on Godot 4.2.2

Hey I was trying to add a new task via the add task button. But when I created it and tried to add it to the behavior tree it says its not a BTTask.

The behavior dir and task dir is defined and the files are saved in each appropriate dir.

Screenshot 2024-05-19 233403

Screenshot 2024-05-19 233309

limboai\editor\limbo_ai_editor_plugin.cpp:133 - LimboAI: Failed to instantiate task. Script is not a BTTask: res://ai/tasks/new_task.gd
limboai\editor\limbo_ai_editor_plugin.cpp:83 - Condition "p_task.is_null()" is true.
@HexBlit
Copy link
Author

HexBlit commented May 20, 2024

There must be some way to get into this state, i just deleted everything and settings and made a new behavior and BTAction and now it is happy...

@limbonaut limbonaut added the bug Something isn't working label May 22, 2024
@limbonaut
Copy link
Owner

Need to know how to reproduce this in order to fix it. What that error means is that script is not recognized as BTTask when asked. Could be a Godot bug.

@limbonaut
Copy link
Owner

This bug might have been fixed in v1.1.0. Not entirely sure, though, since I couldn't reproduce exactly this state.

@agroff
Copy link

agroff commented Jul 14, 2024

I just had the same issue in 1.1.0 using godot 4.3.beta1. I just deleted the demo folder and restarted godot and now it is working. For me the issue occurred in the first task I tried to create after installing the plugin (didn't restart godot after installing).

Hopefully this helps either reproduce or workaround the issue.

@Trece-1101
Copy link

Trece-1101 commented Jul 22, 2024

This bug might have been fixed in v1.1.0. Not entirely sure, though, since I couldn't reproduce exactly this state.

Hi. Still an issue on v1.1.0. I'm using Godot 4.2.2
It has nothing to do with "demo" scene. I installed LimboAI without that folder.
There's nothing special to do to reproduce the bug. Just create a New Task from the Tree Editor (fresh project, fresh LimboAI install). Also, I changed the default (tree and task) folders but when trying to create the first New Task the default route still was the old "res:\ai\tasks"
I changed the route and created the new task, It didn't have the default Icon (no icon) and gave me the "Script is not a BTTask" error.
But the fix is easy... close and restart Godot Editor and that's it. The task takes an icon by itself and works.
After that, you can work without that error (I created another New Task and didn't encounter the issue)

@stebl
Copy link

stebl commented Aug 5, 2024

Just had this error on Godot 4.2. Fresh LimboAI install. The demo worked great. Error shows up when adding custom nodes to the behavior tree.

Godot restart worked 👍

@limbonaut
Copy link
Owner

@stebl
Did you restart the editor after you installed the plugin? I suspect that this error happens if the plugin is installed and used without restarting the editor right after.

@stebl
Copy link

stebl commented Aug 5, 2024 via email

@limbonaut
Copy link
Owner

Maybe I could find a way to ask the user to restart the editor on first install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants