WackyToaster's Forum Posts

  • On start of layout set your global variable to yourobjectname.count

  • I think I figured it out. The CanvasToLayer expression was the key.

    wackytoaster.at/parachute/resize.c3p

  • Here is another solution - click any point on the sprite:

    https://www.dropbox.com/scl/fi/drhkya67euorlv2iq1pqr/rotate_easypeasy.c3p?rlkey=eb74yo7bqm398j8oqt1kdcy2o&dl=0

    Heh, smart solution. Not sure how well it would work with the player in motion though.

  • I think the easiest solution would be to have a separate double-jumping animation with a different origin point.

  • As for adding some margin outside of the canvas, I don't think Construct likes that. But construct games can run in an iframe, so you could add a custom index.html that has the game running in an iframe and add the margin to the iframe. I think that should work, but I'd not want to bother with it.

    Instead adding it in the game should be very much possible and not too hard. First there's the anchor behavior construct.net/en/make-games/manuals/construct-3/behavior-reference/anchor which I found has some quirks to it, but overall is useable.

    Setting the spacer manually there's a couple of things to think about:

    - You can detect device orientation in the browser plugin "is portrait/landscape" construct.net/en/make-games/manuals/construct-3/plugin-reference/browser

    - The plugin also has the request fullscreen action, which offers different scaling modes that you may have to take into consideration. That is likely why your bar changes size when resizing. You might want to refer to this construct.net/en/tutorials/supporting-multiple-screen-17

    - There are system expressions to get the desired full width/height/etc. of the viewport. ViewportBottom(layer), ViewportLeft(layer). ViewportRight(layer), ViewportTop(layer), ViewportMidX(layer), ViewportMidY(layer), ViewportWidth(layer), ViewportHeight(layer)

    - You have to pass a layer into these, so I recommend creating a layer on top specifically just for your bar. And most likely you'd want to set it up for UI-type stuff so with parallax 0,0 and scalerate 0 construct.net/en/make-games/manuals/construct-3/project-primitives/layers

  • Thanks! I should try out typescript at some point. But would that mean in typescript I can't have a base class with subclasses like I used to? Or is there a different way to achieve what I'm trying to do?

  • I just noticed that subclassing changed at some point, probably here construct.net/en/make-games/releases/beta/r362

    Ensure InstanceType namespace exists at runtime

    Now subclassing appears to reference the specific object the class is supposed to extend, as in this case the Player instance.

    class PlayerInstance extends globalThis.InstanceType.Player
    

    However it used to be like this (if the player is a sprite)

    class PlayerInstance extends ISpriteInstance
    

    This code seems to still work, is it fine to keep using it like that? I like being able to extend a generic sprite instead of the specific sprite of the player object. Or am I just misunderstanding something here?

    The reason is I do tend to further subclass my subclasses, so both the player and enemies might derive from a base class with shared functionality, e.g.

    	class Entity extends ISpriteInstance...
    	class Player extends Entity...
    	class Enemy extends Entity...
    
  • Newest project. I actually went events only since it's a very simple game. No need for js :)

  • Here's an in-depth post about it + a section about solutions

    construct.net/en/blogs/ashleys-blog-2/surprising-difficulty-1528

    Generally you'd want to avoid cutting sprites off directly at the edges, that's why the image editor in Construct adds a 1px transparent border around sprites by default. If that doesn't help, you can use the higher downscaling quality.

  • Problem: I wish to store the images in a prepared sprite like - "Load from URI(Sprite.CurrentImageAsURI)"

    Why'd you like to store it in a prepared sprite? Is there a reason you cannot use an ajax request to load the image? If you only want to load the image once, you can store it inside a binary data object and load it from there.

    And for changing a variable to change the theme, that's also possible with this approach. You can request a URL with ajax rather than a file, that you can point to the local resources by string and just add the global variable in the name. So you'd request "stringsub("./tiledfile{0}.png", globalVar)

    This would request e.g. tiledfile1.png or tiledfile2.png or tiledfileVolcanotheme.png, etc.

    I wouldn't attempt approach 2.

    Yeah, mobile is a fickle beast. Apple is cooking their own soup entirely and break things on a whim and android has a billion versions each with different browsers and other minute differences like notches and stuff. I'm honestly a little surprised that anything works at all. But I cannot imagine this to be a Construct-exclusive issue, but other engines simply have the resources (possibly even a small dedicated team) to work around whatever compatibility issue pop up. And the big mobile companies have practically infinite money too to just toss at these issues until they are solved.

  • There's a thread for this

    construct.net/en/forum/construct-3/general-discussion-7/windows-security-block-181649

    But it sounds like you may have found a potential culprit. Maybe post in the other thread instead since there's already discussion happening.

  • It can be fun from time to time but I personally don't watch too much of that type of content usually. I think Randy is fun to watch and he has that typical australian humor to it. youtube.com/@randyprime/videos

  • It's probably just a false positive as usual in these cases? But even virustotal doesn't show a single false positive for me. There's also the possibility that something actually injected the trojan into the file (some weird browser plugin, your system is compromised,...)

    This never popped up for me but it appears to be quite a common thing actually according to reddit.com/r/computerviruses/comments/x1af2y/any_chance_that_trojanscriptwacatachml_is_not

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I kind of wanted to say that you can simply work around it like this

    I feel like it should work but it absolutely doesn't. I also tried a sprite and it also does not behave as expected. I also tried pick by overlapping point instead, which also doesn't work. It seems to be weirdly offset from what is visually seen on the screen at best. I'm not sure exactly what is going on there but it might warrant a bug report?