Jump to content

Search the Community

Showing results for tags 'targeting'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello! I've been playing around with the source code of the phaser example game called Tanks (http://examples.phaser.io/_site/view_full.html?d=games&f=tanks.js&t=tanks). However I have not figured a way to make the tanks target and shoot at the other tanks, so I would appreciate help. There is a line of code for the EnemyTank function to target the player: bullet.rotation = this.game.physics.arcade.moveToObject(bullet, this.player, 500); This makes the bullet fired by an EnemyTank function prototype go to towards the player's tank. I've been trying to figure out a way to modify the target (this.player) in the above line of code so that it would automatically fire at the closest other enemytank function, but I don't seem to get anywhere with it. The idea behind is to eventually make EnemyTank function prototypes (enemy tanks) fire bullets at nearby AllyTank prototypes (tanks allied with player).
×
×
  • Create New...