dop2000's Forum Posts

  • No problem!

    Or you can do this:

    This means - if sound is playing, stop it. And then play the sound from the beginning.

    (oops, forgot to delete the old line with empty "" tag)

  • Here you go:

    I noticed you never use sub-events in your game. This is a sub-event, it's only executed if the parent event is executed (if Player is on the Floor)

  • Sure, if it's not too big

    my email: <censored>

  • No, it doesn't check if the player is jumping or not, it checks if the sound is playing.

    Again, I don't know how and when you check if the jump is made and decide to play the sound.

    Could you share the screenshot of your entire event where you play you jumping sound?

  • I meant replace your existing action (Audio->Play jumping sound) with those 2 lines.

    This is what you wanted, isn't it?

    [quote:94xz1gbr]Don't play jump-sound if the jump-sound is already playing.

    I didn't see your code and don't know where you play your sound. I'm guessing it's inside some event, maybe On collision with a floor, or On key "Up" pressed. So insert my 2 lines inside that event.

  • KeeghanM

    That's what I was thinking too, but still a bit worried

    I just made a little test - replaced Text object with SpriteFont object in an event (manually in C2), and then compared xml files - sid tag remained the same.

    So yeah, it should be safe to change objects in xml.

  • Every time you play a sound you can assign a tag to it. So play your jumping sound with tag="jump".

    Before playing check if "jump" sound is already playing and either stop it or don't play new sound.

    Something like this:

        Audio -> Is tag "jump" NOT playing
               Audio -> Play "your jumping sound" (tag "jump")
    [/code:2w96fp6l]
  • KeeghanM thanks for the tip!

    Do you know what the "sid" tag is for in the event sheets XMLs?

    <action id="0" name="Set text" sid="140336039528208" type="GameOverText">[/code:34f6o06t]
    
    I was also thinking about making some bulk changes by editing XML files, but I was worried about this sid tag.. What if it's somehow related to the object which I'm replacing?
  • I also recommend you fixing your animations - crop unused space, make sure origin point is in the same position on all frames, simplify your collision polygons. Your sprites are very small, you don't need complex collision polygons, they are bad for performance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add this line at the start of layout:

    Player -> Set position to another object -> to CharacterAnimation

    It should be before the Pin!

    And fix Origin image point position for ALL your animations (character, enemy, walking, standing etc.) and for all frames inside these animations.

  • Then you probably need to set the full text with transparent font or something like that. (Setting text invisible won't work, the system will not render it)

    Then Wait 0.01 seconds, measure the text and set the correct bubble size.

    And then erase the text and fill it in again letter by letter with the typewriter effect.

  • You can use Tex.TextWidth and Text.TextHeight expressions to get the actual size of text.

    There is one problem with it though - you can't set text and then immediately measure its size. The system needs time to render the text, so you need to wait until the next tick.

    Insert Wait 0.01 between setting the text and changing your bubble sprite size.

  • KingKong1234 The link is broken and also you need to share the CAPX file, not CAPROJ.

    To create CAPX file, save your project as a single file.

    If you can't post full links, try to remove "https://" part of the url.

  • TRMG Creating this data manually keyframe by keyframe would be a really long and boring job and the results may not be very good.

    Why don't you look for a special software that can create simple animations and export them in text format?

    That guy used Adobe Flash, I had some experience with it and it's a great tool for creating animations.

    I watched the video again, he actually exported animations in JSON format, not XML.

    So you'll need to parse JSON strings, I'm sure it's doable and still must be much easier than preparing all animations by hand.