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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.