Jump to content

Search the Community

Showing results for tags 'timer events'.

  • 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. I'd used game.time.events.repeat() to let a line of dialog come on screen char by char and if the user presses the action button I will force the user to see the full line and only after an additional click the next line should be shown. Now I wonder how to stop the timer as it will run even if I force the end of the line, as it will run into an error. The code below shows up a TypeError and I can't figure out why... Any advice here? I've also tried *.stop(true), but it will also throw a TypeError. Dialog.prototype.nextLine = function () { if (this.isEndOfLine) { this.currentLine++; this.isEndOfLine = false; if (this.currentLine < this.dialogLines.length) { this.speaker.text = this.dialogLines[this.currentLine].speaker; this.spokenText.text = ''; this.timer = this.game.time.events.repeat(this.dialogSpeed, this.dialogLines[this.currentLine].speakerText.length + 1, this.updateLine, this); } else { this.closeDialog(); } } else { this.timer.destroy(); this.forceLineEnd(); }};
×
×
  • Create New...