YoHoho's Forum Posts

  • .....

  • ......

  • camboriu

    Do you mind just giving a quick explanation of the use of local variables? I've seen them before but I'm not sure how to even create them in my own even sheets OR how they're used. It seems like they function like global variables but are temporary.

  • This is something simple I did: imgur.com/a/Ho1Hcrd

    I put the List object in a Music Selection layout for you to choose a song before going to the main game. There might be a way that's a little more efficient but this definitely works. The List object also may not fit the aesthetic of your game, so change it as you see fit. Just note that setting any music to play with a While-like command will try to play music every tick. On or When-like commands should be used.

    You shouldn't have to worry about setting up global variables for knowing which song to play. Music will continue to play between layouts unless you tell it to stop. So if you're always going to end up on the Music Selection layout before starting the game, you should be fine.

    Regarding preloading songs, make sure you're uploading your music to the Music folder, not the Sounds folder. As stated in the manual (https://www.scirra.com/manual/52/import-audio):

    > It is important to organise audio files appropriately, because audio files in the Sounds project folder are downloaded completely before playing, but files in the Music folder are streamed. This means if a Music track is accidentally put in the Sounds folder, it would have to download completely (which could take a couple of minutes) before it started playing. However, audio in the Music folder can start playing immediately since it is streamed from the server.

    Regardings tags, they just make it easier to categorize your music or label it. In the code I shared above, I gave all the background music the "background music" tag so I could easily stop all of it when needed.

    The List object? WHAAAAAT? I've never even heard of that object. Thanks for the info. I will try this out.

  • Still wondering if I can get a response to this.

  • I'm working on a music puzzle game that lets you choose a music track before you enter the game layout. I'm unsure of exactly what steps I'm supposed to take to get this right.

    Would it be easier to have each music track match a global music number in case I end up having over a dozen tracks to select from? Or is there a better way that uses the preload and tag settings for each music track? The preload and tag settings are what I'm confused of how they work and how I pick which track I want.

    Any help would be appreciated. Thanks.

  • Here you go:

    https://www.dropbox.com/s/mvkeozz88p943 ... .capx?dl=0

    May not be the most optimized code, but it works.

    I was looking at the .capx and I wanted to know if the grid can be made bigger or smaller. I tried increasing its size but the random path still restricts itself to the 4x4 grid space. Also, can you give an example at how you would apply this to a game? I'm trying to think about how it would work in a platformer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    ...

  • Sure thing:

    https://www.dropbox.com/s/ei1jwouuq5nlr ... .capx?dl=0

    If you don't want to be able to walk left at all simply remove that action from the movement group.

    It works very much like the older games. Thanks a lot.

  • Hopefully this helps:

    https://www.dropbox.com/s/0meqzkt21ebbf ... .capx?dl=0

    What's going on in the original capx is that the y scroll occurs on the jump command, so the payer's y value is actually lower - or at least different - than the last y scroll value, which leads to a sizable jump in where the "camera" is looking. In my example, I use a value that only updates when the player's y value is less than itself for the scroll. I also could have probably done something like:

    If player.y is less than scroll.y -> set scroll y to player.y

    ...but this only just occurred to me haha.

    Is this something that's easy to reapply to an X scroll instead of Y scroll? There are some older videogames that would let you walk to the right but not back to the left (Contra, Adventure Island on NES) and I've been wondering how to accomplish this setting of not letting the player go backwards.

  • Thinking about how some of my games operate, I was wondering how to go about implementing directional damage. The example being whether the player is being hit from the front or from behind.

    I'm not sure how I would create this since the player sprite can be considered facing left or right. And with 8 direction behavior, you would have front and back depending on the direction the player was facing.

    Any ideas on how this could be done would be appreciated.

  • ....

  • ....

  • Hi. This is a solution I made for a pipe puzzle before but the concept is the same:

    https://www.dropbox.com/s/p04xd82wc1n3m ... .capx?dl=0

    Thanks for this. It works just like I'm looking for.

  • You'll want to use the pin behavior, as well as put the segment objects into a family, which will let you pin segments to each other in order. https://www.scirra.com/manual/99/pin

    Alternatively, you can simply give each segment the same set of movement actions/ai and have them offset by time.

    Exactly how would you accomplish the 'offset by time' part?