I have been trying to make my enemies follow me when they see me and I thought it would be easy as:
1)Adding a LOS behavior.
2) comparing the player's x and enemies's x to make him move.
But when I preview the project it's extremely weird, like he flips around every second and he's really slow.
Can you help me out.
I included a picture of the relevant code.
You didn't include the picture.
After uploading the image, you need to insert it into the message using img tag:
Develop games in your browser. Powerful, performant & highly capable.
Oh ok Sorry. I'm kinda a newbie. Thanks for informing me.
There may be something wrong with LOS setting (distance, angle), which causes enemies to lose LOS to the player. Or maybe some other behaviors/events are interfering.. Hard to tell without seeing your capx.
Ok then I'll post my .capx.
What you didn't show on your screenshot is that the whole Run group is nested under another event which has condition "Badguy platform is not moving". That's why it's only triggered when the badguy is not moving. So the badguy is constantly moving and stopping every other tick..
This is wrong, just move the group out of the event 27.
It's working! Thanks a lot man.