Detection and Chasing (SCRIPT HELP)

i need some help for a cool idea. a detection rate meaning the more you stand by a enemy they become more aware of your presence, and to go along with it a chasing script so the enemy will hunt you down when there detection is 100%

Not too hard, do you plan to use Raycasting or Proximity?

Either way, if the enemies can see the player, it will always be outputting.
Use this to start a timer that will +1 to the detection.
If it can detect the player, use a NOR gate for no outputs and that will start a timer for -1.

Could you send an image of what you mean @“JR 01” ? :slight_smile:

Well I’m not sure how your gonna set up how the enemies detect/see you.
But the Part I’m talking about can go something like this
(just an idea, may need changes for what your trying to do):



yo thanks @“JR 01” for helping :slight_smile: :slight_smile: :slight_smile:

but what about the part where it chases you :anguished:

Thats after you get detected, and pretty easy.
But again depends on the type of game.

Here’s an example for a chasing enemies:

thanks @“JR 01”

Ayy @“JR 01” ive got more problems…

So i saw your example of chasing, its good’n all but i need to conserve space :slight_smile: . A need help without a hitbox.

Ohh!.. and is there a way to make the enemys like a pack and help each other out?

My chase example is how enemies move in all directions without rotating the object.
You can still do this with one object but would need to use the x and y independently.
You can find a chase example like that in the help section of flowlab.

For grouping enemies, your going to need several layers of coding.
As in, priority for different sets of proximity.
For a better idea for proximity layering, look at the “refracting” object in my light test.

The other example is not my perferred type because its always coming for you… yours is smoother

anyways how would i use x and y seperate exactly?

Use my chase example to use proximity like a switch and use that other example to move. Why mine is smoother is because the hitbox is always pointed at the player. The bat is on top without rotating.

And I mean as x and y separately for you dont use forward velocity.


Hey when you guys are done could you post a screenshot of the final code bellow, or maybe put it in a named bundle because this could be really helpful


so for the chasing part @“JR 01” would the angle to script you made work with an always hook to a forward velocity work?

Forward velocity is based on the objects rotation, so it would still rotate.
That example is to show that you can shoot in any direction without rotating.

The only way to move 1 object without rotating, is to use the X and Y instead of forward.