RandomDevNeedingHelp
New member
Hi everyone,
trying to get some basic understanding on how this works by building a quick example scene.
My goal is the following:
- Have the player auto-cast, in a loop, every X seconds
- Have the cast spell be defined as a ScriptableObject
- Have the X seconds interval defined as a property in my Stats component
I've seen that there is a Wait node but seems like I cannot "bind" it to my Stats component so I would have to build one manually.
My initial thought is tthat things are supposed to work more or less like this:
- A node is initialized with the current X seconds based on the Stats component
- The corresponding system decreases the time by DeltaTime on each tick
- If the time is <= 0 then the Task is successful and we can move to the next Task in the Sequence which will perform the casting
I don't know if this is correct and I'm looking for some guidance on the best practices for this.
I'm also planning to build this as an IJobEntity because the same logic will also apply to all the enemies on screen.
EDIT - additional question: how can I bake a projectile Prefab in my sub-tree (e.g. having it as a GameObject variable) so that it is stored in my custom component? The AddBufferElement doesn't allow to bake prefabs to entities...
trying to get some basic understanding on how this works by building a quick example scene.
My goal is the following:
- Have the player auto-cast, in a loop, every X seconds
- Have the cast spell be defined as a ScriptableObject
- Have the X seconds interval defined as a property in my Stats component
I've seen that there is a Wait node but seems like I cannot "bind" it to my Stats component so I would have to build one manually.
My initial thought is tthat things are supposed to work more or less like this:
- A node is initialized with the current X seconds based on the Stats component
- The corresponding system decreases the time by DeltaTime on each tick
- If the time is <= 0 then the Task is successful and we can move to the next Task in the Sequence which will perform the casting
I don't know if this is correct and I'm looking for some guidance on the best practices for this.
I'm also planning to build this as an IJobEntity because the same logic will also apply to all the enemies on screen.
EDIT - additional question: how can I bake a projectile Prefab in my sub-tree (e.g. having it as a GameObject variable) so that it is stored in my custom component? The AddBufferElement doesn't allow to bake prefabs to entities...
Last edited:


