Move Object Randomly and detect motion

I am making a game in which the enemy will follow character if it is within the distance of 200.
so if distance between character and enemy is less than 200 then enemy will follow character but if it is greater than 200 then enemy will follow a random motion means there will be some points or locations, randomly enemy will go to one position and when it reaches there, another random position will be selected.

I used this logic, in this, when distance is less then 200 enemy follow character and when exceeds 200 then enemy follow random position but the main problem is that after reaching the point, again randomization do not takes place ,I used various things like collision, equating last and present enemy position and even equating destination coordinates and enemy position. here enemy is DinoDoux.
I would like to get some clues or solutions.

I read your issue
Yet i just did look trough your conditions

And in my eyes your issue is
You send somewhere your object
Yet you do not check if pos of your object is equal to that position
You just have some boolean vars there which makes no sense to me

What you should do is WHEN object should pick random pos you roll RandomInRange random in range if its for ANY random location and put that number into two variables of your object one for X and one for Y
For example PosX and PosY so you would roll random in range for both of them
Imagine they result in PosX = 105 and PosY = -20
Now what you do is move your object toward that position
And you have 2 options
Either you check if your object X pos and Y pos = its PosX and PosY vars
Or check your object distance to position is it below something
There is condition compare two numbers
And expression ObjectName.DistanceToPosition( X , Y )

If its for picking random point you pre set on your map
For example you have 3 posts where your object could go
Then you can pick random object from these posts
And set your object (the one you gonna move) PosX and PosY vars to X and Y of that post
And do pretty much the same of what i describe above for if you go with totally random location

Because of the trigger once all of the subevents will only be triggered for 1 frame per trigger. That means the keys would need to be pressed at the same time that the object is over 200 px away. The same with the other subevents.

You might need to remove the trigger or move some of the events to their own lines or at least one indentation to the left and/or modify the conditions.

I am very sorry that I have not mentioned about the “l” key. 1st I tried without it,.then also it was not working, so I thought that the control is not reaching there, so I just added that to test when I click that key but that was also not working.

2ndly on removing trigger once, enemy performs a glichy movement

Here’s an example of what I think you want to happen. There’s a player, an enemy and 2 instances of an object named waypoint. Waypoint could just as easily be a group with infinite objects inside it.

Edit: I removed a trigger once. I was testing it on a stationary player.

If there are multiple enemies then you would need to modify it. Maybe remove the trigger once and use an object boolean.

Yes I wanted exactly this only, but my only 1 problem is that after reaching the destination enemy should find another destination and move towards it

The pathfinder has a reached destination condition. As things become more complex, you might need to add more conditions like a boolean variable to check a state.

This is fairly straightforward.
Destination reached.
Pick the waypoints that the enemy isn’t colliding with. It prevents the current waypoint from being picked.
Pick a random waypoint