Sam Mortimer's Forum Posts

  • WAIT.

    I tried moving all the music into the sounds folder and now it works a dream. Apparently all those tantalizing audio actions like 'set volume' only apply to 'sounds', not 'music'. Very strange.

  • I play looping music at -20 db with the tag "1b". I say 'every tick, set "1b" volume to 0db'. The volume is still -20db. Jesus christ, I'm trying everything but I just cannot get this horrible software to change the volume of a sound. Help, please.

    I started off with looping music that starts at -50db in one layout, then in the next layout the music's volume is set to the value of a global variable. The music track was supposed to get louder the longer the player is in the air, Portal-2-gel-style, so this variable decreases while the player is on the floor and increases otherwise.

    This didn't work, so I thought that either A. my variable isn't doing what it's supposed to or B. Construct 2 is forgetting about sound that started playing in a different layout. First I tried replacing 'set volume to the-variable db' with 'set volume to 0 db', which didn't have any effect.

    Then I tried starting the music on the same layout in which its volume is altered as opposed to starting it in the previous layout and then altering the volume in this layout. Didn't help.

    I'm out of ideas. If anybody knows why on earth Construct 2 wouldn't respond to the straightforward, "On start of layout play music at -20db, every tick set volume of music to 0db," please tell me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, of course! Only check vector Y while the player's falling. Duh.

    Thanks a bunch.

  • In a platformer I'm making, I only want an impact sound to play if the player's Y-vector is greater than 100 when they hit the ground. I guess the way to do this is by working out how fast the player was moving a few ticks before they landed, so I've written, "Every thirtieth of a second, set instance-variable-1 to the Y-vector, wait a thirtieth of a second, then set instance-variable-2 to equal instance-variable-1. If instance-variable-2 is greater than 100 when the player lands, make a noise." Unfortunately this is buggy and unreliable and I'm sure there's a better way to do it.

    Another example is if I wanted something to follow the player around, such as a hat that lags behind a little bit. I want to write, "Every tick, set the hat's position to what the player's position was a few ticks ago." So what do I do? How do I find out values from the past?

  • Thanks a ton! Shame families are only in the full version.

  • So I've got some bullets. They bounce off of solids. I want them to disappear after three of those bounces. How do I do that?

    I thought it would be as simple as adding 1 to an instance variable with each bounce, then destroying the bullet when that variable reaches 3, but the problem is that there doesn't seem to be any kind of 'on-collision' event. There's 'on-collision-with-a-specific-object', but not 'on-collision-with-any-solid' by the looks of things. Surely I don't need a separate event for every solid object in the game?

    So, um, what do I do?

  • . . .

    Damn that is smart. Thanks! That explains a lot!

  • Sometimes an object will flail around miles behind whatever it's rope-pinned to, other times it'll be just a pixel or two away. I must be missing something obvious here... but how on earth do I control the maximum distance between an object and the object it's rope-pinned to?

  • I'm very new to Construct 2, so sorry if this is a daft question.

    Is there a way to check the bit rate of music I've imported? I imported some music for my little project, and now I'm importing another track and I want it to have the same audio quality, but of course I've forgotten what I used previously.

    How can I check the bit rate of the other tracks?