farflamex's Recent Forum Activity

  • I'm scaling a layer, which contains a tilemap, using the 'CanvasToLayerX' etc commands (which I find very confusing, but they seem to work). I then find the position that's been clicked/touched with 'MyTileMap.PositionToTileX(Touch.X("TileMapLayer")) (same for Y obviously).

    It works fine on my PC, a friend's PC and on my phone, but it doesn't work on his phone. It looks fine and seems to scale correctly, but the touch command is returning the wrong tile.

    Since it looks ok, I'm guessing my 'CanvasToLayerX' command is correct....

    CanvasToLayerX("TileMapLayer",LayerToCanvasX("Background",TileMapX,TileMapY),LayerToCanvasY("Background",TileMapX,TileMapY)) .... (that's just the X, same is done for Y). This is obviously just to ensure that it's centred correctly on the screen, using the 'Background' layer which isn't scaled or offset or anything.

    Looks ridiculously complicated and I won't pretend to understand it, but it does work.

    So am I using the wrong command for the input, or am I doing something obviously wrong?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. Actually I think just WindowWidth and the Viewport options do also correctly show the screen size, on phones at least. I'm tinkering around with a phone game but wasn't quite sure how the screen sized itself, but I think it's permanently set to whatever the max size of the phone is... I think.

  • Is there a way to find the maximum window size for the device you're using, during runtime and then setting the window to that size?

  • Ok thanks. That did actually work. It's just a bit fiddly because I don't know how long it needs to be. I guess I'll work it out through trial and error

  • Problem Description

    I create a sound with Audacity. It's just a very short click. Export it to a WAV file, then import into C2. C2 locks up completely and can only be shut down via the Task manager. If I export other sounds (longer sounds seem ok) using the identical method, they work fine. This problem happens in a brand new project. It seems to be something to do with the length of the file?

    I can't add the sound file as an attachment. Is there some way I can send it in as a test? It's not JUST this file. Doesn't matter how many ways or times I create a similar file, it crashes. But slightly longer files seem fine.

  • Is there a way that I can attach a sound file or send it to Ashley? Even if I try to import it into an new C2 project, it locks up C2 completely. It's a standard WAV file exported from Audacity. Very short, just a click. Other files exported in the same fashion work fine, but this one locks up any C2 project (and I've seen it from other sound files). Maybe if I can send it to him, he can reproduce it?

  • I've just encountered this again and I see my original post is from 18 months ago. It's still happening, I import a WAV and the import bar loads to the end, then just locks up. The only way out is to shut down C2 through the task manager.

  • Ah thanks, I was hoping it was that. It used to add the wav during the process but now it doesn't... which is good I suppose

  • I'm importing a wav sound file. It converts successfully to ogg and m4a but the wav itself isn't inserted into my project. Do I need to change something.. or do I not need the wav file itself?

  • Did you solve this? I achieve a sort of space-wispy-cloud affect in my game here - http://korelos.clay.io/

    I didn't use tilemaps though. iirc, they're just a bunch of sprites.... hmmm, or maybe I used tiled backgrounds..... can't remember but can look back if you're interested.

  • Thanks, confusing statements but I just copied your line and replaced the layers/sprites with my own and it works perfectly

  • I guess a simple way of wording this would be, how can I put a sprite on top of another sprite, if they're both on separate layers and the layers have different scales/parallax etc?

    I've spotted the 'CanvasToLayerX' and 'LayerToCanvasX' stuff but can't work out how it works.

farflamex's avatar

farflamex

Member since 7 Oct, 2012

Twitter
farflamex has 15 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies