Show EnemyStats

0 favourites
  • 5 posts
From the Asset Store
Firebase Leaderboard
$2.50 USD
50% off
A small template showing how to build a firebase ranking
  • I've got a platformer level, and I have multiple enemies on the level. What I'd like to do is when I press the letter D, it will toggle a debug mode, where next to each enemy will be a block of text showing some basic stats would show up.

    How would I go about setting up these blocks of text so they'd be pertinent for the enemy it's attached to (if that's even the correct terminology).

    I imagine I'd have to have a text object, and on the startup of the layout, loop through these enemy instances, create a new instance of the text block next to each enemy. But how do I ensure the block of text contains the values for the specific enemy?

  • Nevermind, I believe I got it... <img src="smileys/smiley41.gif" border="0" align="middle" />

  • How to do that?

  • Containers, I think.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, I really don't know anything about containers, and I don't know if I'm doing this right, but it works. On the layout startup I iterate through all enemies and create a txtStat object, and assign the UID to the specific enemy. On every system tick, if the global variable DEBUGMODE is true, then I write a series of text strings to the appropriate txtStats object by selecting it via the enemey statsInstance variable. If DEBUGMODE is False, then it just iterates through all the stats text objects turning them invisible.

    startup

    Tick

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)