AlexArroyoDuque

intelligent projectiles that follow the player.

Recommended Posts

Hi, I'm new in the community and I love phaser JS.

I'm developing a platform game. I like to comment my problem with "intelligence projectiles"

 

 

I would mention to my problem with "smart missiles".

Basically I do not know how to perform this task.

 

I am able to handle sprites with animations but I do not know as provide them with "intelligence" to attack the player.

I want the enemy attack the player shooting projectiles that follow.

 

I attach a picture with my problem.

 

Any idea? A greeting.

post-6577-0-57502800-1391544311_thumb.jp

Share this post


Link to post
Share on other sites

I have edited the example a little.

 

So that it reuses bullets and does not create an unlimited amount.

 

Try to change the speed values in move to object - also you can call it in another foreach loop on the projectiles group, to make them follow the player even after they have been initially shot.

 

Good luck :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.