Jump to content

Search the Community

Showing results for tags 'decrease'.

  • 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. So I have been working on this tycoon game for a few days now, (you can try what I have so far here) http://www.newgrounds.com/projects/games/935963/preview As a next feature I was going to add a money system, where each tile would cost $15 to place down Here is the code I'm using to place a tile down if (game.input.mousePointer.isDown) {if(!outarange){ if (sandbox.getTile(layer.getTileX(marker.x), layer.getTileY(marker.y)) != currentTile) { mtween.x = this.input.activePointer.worldX; mtween.y = this.input.activePointer.worldY-50; mtween.visible = true; money -=15; sandbox.putTile(currentTile, layer.getTileX(marker.x), layer.getTileY(marker.y)); } }}If you tried the demo, you might have realised that the money value goes down every frame while you're holding down the click button. How would I do it so it only gets decreased by 15 everytime a new tile is placed. Thanks for the interest
×
×
  • Create New...