Hi Andrea
A bit off topic but, this sounds like a good candidate for internal pooling in the node to reduce the instantiation cost. I would suggest you to have a look at how the PlayAudio node is implemented.
Hope this helps
Hi Andrea
A bit off topic but, this sounds like a good candidate for internal pooling in the node to reduce the instantiation cost. I would suggest you to have a look at how the PlayAudio node is implemented.
Hope this helps
Great! Really happy to hear that
@MorganHoarauUnity @Darren_Kelly So I managed to do a pooling system like the audio node and a complete dialogue system, of course I had to do some adjustments to the system but it works great.
Nice one! Keep us posted with what you make with it in the future!
Hi Donurks,
1.0.3 is finally out and you can test to see if this case is now working for you!
It works wonderfully! Many thanks and best wishes to the team!
Great, happy to hear! Thank you!
I have the same questions as you and have yet to find a good abort example where it gets a bit more complex and the execution is further down in the tree
I am probably missing something really obvious… But how can I abort a parallel node where one node is patrolling to a point, and the other is checking for targets nearby?
I just know this package exist. Seem very interesting. I would like to ask some question
1 - What is this package differ from the full visual scripting?
2 - Can this package being used in runtime? I mean, can we making graph UI and utilize its framework to make a game with in game scripting system? Is this package include runtime graph ui?
Hi @PoZER937,
You have multiple options here. You can do something like Run In Parallel with Until Any Succeeds mode, like this.
Or you can use an Abort node with a specified condition, such as checking for a valid enemy / target, or switching an enum state in your loop.
Hi @Thaina !
Let me try an answer this:
It’s quite different. Unlike Visual Scripting, it doesn’t try to get you to “visually code”. Instead it provides high level nodes that are essentially state machines which perform certain actions or decisions.
It’s essentially a behaviour tree tool with more features.
Also unlike Visual Scripting, it’s fully backed by C# code, not reflection, and you can extend it and make your own nodes / actions.
You can view our webinar about it here:
git-amend also made a great video:
In theory yes, this is actually what powers Struckd custom logic, but we’ve put a lot of the our frameworks as internal as we don’t feel like they’re ready to be exposed yet. You could make a local copy and change them to public and follow our BehaviorWindow
code as example if you wanted to try it, but please note that this code might change and we can’t guarantee API stability for this at this time.
Thank you very much
You can try out the behavior package working inside Struckd here if you like:
I was the Dev who integrated the package in Struckd, I can say it’s a good amount of work to do so & we recommend not doing this currently. We had a whole team in Struckd to support this.
If you are a company and have a valid use case to do this we could chat, as a solo dev I would definitely advise against this right now.
Is there a node for weighted random?
Currently, there is no such node
However, you can create your own Weight Random node.
If Unity were to support such a feature, I would definitely find a use for it.
I haven’t really thought about it before,
but how should we handle input for parameters with a variable number of elements?
A Weighted Random node needs to allow setting a weight for each element.
When there are 3 elements, it requires 3 weights.
When there are 20 elements, it requires 20 weights.
How do i represent this in the node?
Using a List<float>
variable in the Blackboard reference could solve the problem.
I’m not too fond of this approach, but it does work.
Take a look at RandomComposite.cs
.
I think you might be able to create Weight Random Node.
Oh, and another thought I had while working on this
wouldn’t it be great if we could set the node’s color in the NodeDescriptionAttribute
?
Is it possible to make the custom Weighted Random node purple, like the other Flow nodes?
Guys I’m trying to select the action to do based of a number on the blackboard, i don’t want to use switch with enum so what can i do?
Check out the scripts for Flow Nodes like Switch and Random that determine which child node to execute.
You should be able to create your own custom Value-Based Switch Node
I have tried but there are some difficulties like: i can not see exposed values for custom Composite, only for actions