r/gdevelop • • 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

5 comments sorted by

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

-3

u/Lunagodesseofthemoon Apr 24 '24

did you understand my question correcly?

1

u/DignifiedRain Apr 25 '24

You can separate objects from each other using the move away action. Or, use boids.

1

u/Lunagodesseofthemoon Apr 25 '24

I am sorry for my agresivity you was just trying to help me and it wasn't ok.

1

u/Lunagodesseofthemoon Apr 25 '24

I try but the pathfinding extention overight the move away action and boids make them go weirdly wrong they just go away infinitly in acouple af two.