Hi, how can I use wild cards on string cases?
Thanks.
I kinda see what you are going for and there are a few ways to do so. You can either add each string to the Pin names on the switch node or you could use a map variable.
Thank you Chitolocz for reply my question.
Finally I solved my problem with create an array.
But I have another question. Can I make dynamic name for casting?
Are they child classes? Is casting totally necessary? I tried to stay away from casting as much as possible. If dad, kid and teacher are all children of a parent class all you’d have to do is cast to the parent class once instead for each case.
No they aren’t child. It is necessary to casting because I need their functions in the task behavior tree.
What about using an interface? You could setup the functionality in each of the classes then call the message from the AI. IDK just spitballing since there really isn’t a way to cast dynamically (at least to my knowledge).
Thank you. But I don’t know safety and performance in interfaces versus Casting. I think I should migrate to C++ in the future. Because it is less ambiguous.