How to handle multipurpose player control/AI enemy "entity" in "monster collection game". (Also how late is acceptable to post here...)

Godot Version

4.2

Question

Hey, main question → Should I make two unique scene instances for player control / AI control instance of the same “entity”. For some reason I’ve latched onto the idea of making a contextual script which runs functions after determining it’s player vs AI status. Just want to know how this is generally handled…

Also how late is acceptable to be posting here?

I’m not sure if I understand right but it is perfectly fine to create a node just handling control.

scene root
|_Entity
| |_PlayerInputController
|_Entity
| |_AIInputController

I wouldn’t create a script which is trying to figure out if it should be doing one of two completely different things, because this would create a mess.
Instead I would look into polymorphism and duck typing.
Hope this helps!

1 Like

Ok, I’ll look into it. Thanks and sorry for late reply.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.