Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Creature Of Habit

Pages: 1
1
Ask a Question / How to get enemy to follow X and Y location
« on: December 08, 2022, 02:44:16 am »
Hello  :)
I am new to Stencyl and am attempting to make my first game after watching a few free courses online.

I am making a top down vertical scroller where the player makes his way up the screen and encounters enemies. I have managed to get what I need to work on both the X and Y position separately, but when trying to enable both at the same time, the enemy direction and animations go completely wrong and they barely move.

I want the enemy to stay in line with my player as he moves on the x axis, but also to approach my player but stop when he gets within a certain distance as I will then be making a behaviour for him to shoot player.

I have attached both my logic for the x and Y tracking and will appreciate any help I can get :)

Pages: 1