Jump to content

intelligent projectiles that follow the player.


AlexArroyoDuque
 Share

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

Link to comment
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 :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...