guannstar's Recent Forum Activity

  • Never mind, the "Score" text object is not copied. Yeah, a copy of the text object is on every layout. The problem is that the text is underneath a new "game over" picture/object, so I had to use a "create object" event to create it again so that it (the "Score" text object) shows up on top of the "game over" picture/object instead of underneath it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, I just copied the "Score" text object.

  • Hello all, I have a problem. How do I force text properties to appear? As you can see below, I've created a text object called "score"; the yellow version on the left is how I want the text to look, and it does. But when I "Create Object" --> "Score" on layer 6, it shows up like the red version of the text (on the right). Does it not pick up text properties when you "Create Object"? Can somebody help me to figure out why this is happening?

    Thanks,

    guannstar

  • Yeah, it did work... omg, it all works now, thanks a lot man. LittleStain, you're the best! Blessings upon you a thousand times lol!

  • Okay thanks, I'll try that and get back to you.

  • Hey LittleStain, I tried what you said and it worked at first (when there was no 'subtract from' code at all). So, without the 'subtract from' code there, when I would die, the LifeHearts (lives left) will now show up again and are visible on the screen/layer, as they should be (so basically, adding the int partially fixed it). There's still a slight visibility problem though, but, it only occurs (disappears) when I add in the 'subtract from' code for some reason (the code is highlighted below). So, my question is, why are the LifeHearts (lives left) disappearing now, but only when I 'subtract from' varLifeHearts and not when I 'add to' varLifeHearts?

  • Thanks LittleStain, I'll try that and see if it works.

  • Bump.

  • Hello all! Okay, so I tried something different with my code and I made it so that LifeHearts (my "lives left" tiled object) is controlled by a global var instead of an instance var. This time, the adding and subtracting of the width works fine, when you beat a level it perfectly adds 24 pixels (adds a heart) and it shows up on the next level/layout as it should. The problem is that when I lose the level and restart it, my LifeHearts (the hearts/lives left) object will not show up again on level. It seems like my LifeHearts object is being told to disappear somehow even though I made it so that, every tick, LifeHearts will remain visible. Why is this happening... I mean, why does my LifeHeart tiled object just disappear, but only when I lose/have to restart a level?

    Here's my code:

    Thanks,

    guannstar

  • So, how would I make it so that when all of level 2's enemies are killed --> add 1? My enemies are grouped in families, but the problem was/is, instead of adding 1 heart when all of the level's enemies have been destroyed, it would add 1 heart every time I destroyed a single enemy on the level. So, if I changed the "enemy2health<0 event" with "familyEnemies2<0", how would I make it so that only when it destroy all enemies on the level will it add 1 heart, rather than adding 1 every time a single enemy is destroyed?

  • OK, I did what you said, but it's still not working. This time, it works fine on level one, but on level two and on all of the other nine levels, the hearts just ignore their commands and displays way more hearts than it's supposed to. For example, on level two, it should show only two hearts, but instead, it shows this:

    Do I have to use a global variable or something?

  • Sorry, I just want to make it clear, I should completely delete those lines of code? Not just replace "Set width to..." with "Set width to lifeHeartTiled.varlifeHearts*24", like I did below?

guannstar's avatar

guannstar

Member since 14 May, 2013

None one is following guannstar yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies