HelmetPIg's Recent Forum Activity

  • Hm, now the error reads:

    Cannot read property '0' of undefined

    line 168, col 28

    Uploaded a very quick test capx here if you needed to see it (I click to run the timer, then click button to save/swap layouts, then click again to try to load the save)

  • rexrainbow Hm, follow-up error here. Saving is fine, but trying to load a saved game (with the stopwatch plugin active) causes an error in the plugin. Any help would be appreciated!

    Uncaught ReferenceError n is not defined

    line 168, col29

  • Works perfectly now, thank you so much for your amazing plugins!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Very useful function especially with the timescaling independent of system time. This seems to error out when I try to save state with it running though. Any advice/fix please?

    To duplicate -just add an action: System>'Save game to slot "mysave"

    Error message: Uncaught TypeError: this.timers.saveToJSON is not a function

    (line 179, col 39)

  • Thank you rexrainbow!

  • Anyway to show all my collision boxes similar to the 'Show collision polys' button in the editor? Like showing hitboxes in CSGO or Touhou? Preferably not by adding a ton of new sprites everywhere..

  • Hi rexrainbow -- just wondering, what are the primary benefits of this vs. having an instanced variable on the sprite that control what it does? I'm thinking about this in terms of enemy AI.

    Sprite.statevariable = 0 then do X

    Sprite.statevariable = 1 then do Y

    etc.

    Does this result in better performance? Something else?

  • I'm wondering what the best way of optimizing code for a number of different AI would be.. currently using

    on EnemyFamily created [general enemy initialization code]

    on Enemy1 created [enemy specific initialization code]

    on Enemy2 created [enemy specific initialization code]

    on Enemy3 created [enemy specific initialization code]

    if Enemy1.count > 0

    [Enemy1 specific AI code]

    if Enemy2.count > 0

    [Enemy2 specific AI code]

    if Enemy3.count > 0

    [Enemy3 specific AI code]

    ... etc for 40 or so different enemies. Already using families to group most of the similar code but there's quite a few unique things to each enemy (e.g., teleportation, spell casting, etc.). Profiler tells me my enemy code is still using a good chunk of CPU time even when there are no enemies spawned. Wondering if there is a better way to segment off enemy specific code so it doesn't keep checking to run if nothing is spawned. For example, is it better to check if the enemy sprite is visible? Or have a Global variable increase if there is that type of enemy spawned?

    Thanks for any help guys!

HelmetPIg's avatar

HelmetPIg

Member since 19 Jul, 2015

None one is following HelmetPIg yet!

Trophy Case

  • 9-Year Club

Progress

9/44
How to earn trophies