Randomized Nodes
Wokarol opened this issue · comments
It would be really handy to have nodes such as "Random Selector" or "Random Sequencer". They would be helpful for creating more non linear enemy behaviours. Especially for bosses.
(For clarity, by "Random Selector" I mean one where nodes are checked in random order and by "Random Sequencer" I mean one where nodes are sequenced in random order.)
Interesting idea. For selectors it should be already possible to do that by putting a Random
decorator at all subbranches of the Selector.
Random on childs won't give correct probability I think. And even if, you would have to tweak probability everytime you change number of childs.
Fair enough.
I think that should be possible to implement. Right now I'm on vacation so it could take some time to do it myself... If you want to give it a try yourself, I'm happy to take pull requests ;-)
I’ve merged your pull-request at #18
Thanks again for the contribution.
One thing that's a bit unclear to me right now is what should happen with the child priorities for the stops rules.
Right now I kept it the original order (not the randomized one), but one could argue that the children priorities should change to the randomized order...
@Wokarol may i ask you how you used the selector and random method? i can't quite get a hand of it.
@Luuno // What Selector and Random methods you have in mind?
@meniku // In theory, best way would be to keep randomised order, but I don't fully understand stop rules yet. I will probably change it, but first I have to understand how it even works.
@Wokarol i would like a set of actions to be picked at random. so my animal behaviour is more random and natural.
@Luuno // Just use Random Selector like Selector.
@Luuno // You have it downloaded from Asset Store or Git? It's feature I've added recently. It's possible that it isn't on Asset Store yet.
I didn't update the asset store version for quite a while. I've planned to do it soonish
I agree that the pre-defined random order might make the most sense, although I'm not quite sure if it really makes sense to use stops rules with those random decorators at all.
I think it makes sense, for end user randomised nodes are basically nodes that shuffle their childrens