lionz's Recent Forum Activity

  • If you have already generated the obstacle map on start up and disable the collisions after this then it won't have any effect, it will think the obstacle is still there. If collisions are disabled at start up then it will never see it as an obstacle.

    However none of those events are necessary because Construct will not draw objects that are off screen. I would be more concerned about the high amount of objects.

  • 2 global variables.

    On start of layout (or some other trigger), set global variable 1 to family.count

    Every tick, with condition (C) family.boolean=true, set global variable 2 to family.pickedcount

    Compare 2 variables, if global variable 1 = global variable 2, end turn

    You should see global var 1 as the total family members, you can set this once if the number of enemies doesn't change or at random intervals if the number of enemies will change. Global var 2 should be increasing as the boolean becomes true for the instances. Run it in debug to make sure it's acting correctly.

  • You could use family.count for the number of enemies in the level. You can then do a separate family.pickedcount with a condition that the variable is true and compare the 2 numbers.

  • Good job, looks great and fun to play. Probably a little short though right? You'll have to give them reasons to play again to level 20 ^^

  • Hello again, that's up to you and the design of the game. What does the player need to do to reach the next level? You could do it with reaching a score but usually in a platformer it's reaching the end of a level right so it could be overlapping an object or interacting with something like pressing E on a door?

  • You can use a variable as a condition to make sure it runs only once. You can press C on the event sheet to add a condition under the original event.

    So for simplicity, you create a global variable isDead set to 0 by default. Under the on collision with pillars event, you add a condition if isDead=0, then on the action side of the sheet where the 'play sound' action is, you would add 'set isDead to 1', therefore it is never true again and will not play the sound. Of course when you restart the game isDead is set to 0 again.

    Note because you are locking out the sound played, if you have other logic like animations that play when you collide with pillars they would have to be moved to a different event so it plays all the time.

  • No problem. As predicted you are trying to play the song every tick, you need 'trigger once' condition under the track = x events, so that when track variable is updated it plays the song once. At the moment it is just running continuously so restarting the music over and over, it won't be anything to do with timescale.

  • I think you've overcomplicated the menu logic, there isn't a need for a for loop or booleans to turn songs on and off. You didn't share any of the logic where you are playing the music but my guess if you have it set to play audio every tick when you need a trigger once.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would just have a global variable that starts at 1, and when you press right arrow, it adds 1 to the variable and each number relates to a song. You can also relate the same variable to animation frame.

    pseudo something like :

    global int track = 1

    On right arrow pressed, stop audio, add one to track

    On left arrow pressed, stop audio, subtract one from track

    If track > 13, set track to 1

    If track < 1, set track to 13

    songcho, set animation frame to track

    If track = 1, play song 1

    If track = 2, play song 2 etc

  • You're not supposed to give the floor 'platform' behaviour. It is for a playable character in a platformer not a platform i.e. something you stand on. You would give the floor object jump thru behaviour but not platform.

  • No they run from top to bottom in C2 so I wouldn't split out logic across event sheets. You should keep similar logic in one event sheet as a standard. There is no need to split the bullet logic between event sheets for example. The issue with the enemy ships occurs within the same event sheet where you destroy the ship on bullet hit then try and calculate the health later on. Just keep in mind that events run top to bottom even though they seem to run at the same time because it is so fast (every tick).

  • That issue is caused by the bullet being destroyed in player mechanics event sheet. If that event sheet is first then the bullet is destroyed before it can detect damage in the meteor event sheet.

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 73 followers

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

24/44
How to earn trophies