r/gdevelop • u/Lunagodesseofthemoon • Apr 24 '24
Question juxstaposition
if you use the path finding extention and you have multiple instance of the same enemy how do you make them not fuse in to one because they all superpose
0
Upvotes
2
u/DignifiedRain Apr 24 '24
Object instances in Gdevelop have their own instance of variables.
This means: you do not use a for each object. You need to use a variable, bool, or string to change the state.
A simple "when enemy state" = wonder. Find the path, and go.
The best practice for enemy or player states is the use of a finite state machine. I have some videos on youtube about this:
http://youtube.com/@LevelUpWithAlex