I want an enemy just like Ghost but instead of Teleporting, it will dash to the current position of the Player that’s why I want to get the Player’s X and Y position. It only stops (force is permanent) when it collides to a Wall (I have 4 objects called WallLeft, WallRight and so on that’s why I also need to specify what object will it collide on. Then it will resets the timer and start again.
By the way, I already created events for the Ghost and this enemy “Ram” and it’s working perfectly until I tested two or more of it and saw that it isn’t working when two or more of that same object are in field that’s why I created this “How do I”.
Yup! It’s like the enemy in most of games where it dashes through the current location of the player then when collides to a wall, it stops. But in addition to that, after the collision, it will have a random force so that it will move randomly. Just like the Ghost that after they teleport they chase the player but instead of chasing them before the timer comes, it will move randomly and bounces off wall with the help of “bounce” function behavior.
You can pass groups to a function but you need to create the group into the function. anyway if you find more easy to use objects is fine.
I’ll check the Ram project later and tell you something.