R0J0hound's Recent Forum Activity

  • You could create the objects with one event, or just place them with the editor.

    Then with a second event you could set the frames.

    Maybe:

    start of layout
    For each sprite ordered by random(1)
    — compare: loopindex=0
    — — sprite: set frame to A
    — else
    — compare: loopindex<=2
    — — sprite: set frame to B
    — else
    — — sprite: set frame to choose(C,D,E,F)

    Or you could use an instance variable to mark the sprites as unset and have a series of events to pick a random instance of the unset ones, and set it and set a frame.

    A third way to look at it is to make a list with an array or text variable, and populate it with on A, two B’s, and n amount of a random cde or f’s. Then you’d shuffle them before setting the frames.

  • This will loop over each of objB and pick any objB with a variable that matches B's uid. If you only have one instance of objB you can omit the loop.

    for each objB
    objA: variable=ObjB.uid
    -- do something

    If no instances of objA are picked the event won't run. However, you can utilize else for the case when nothing is picked. Mind the indention that represents nested events:

    for each objB
    -- objA: variable=ObjB.uid
    -- -- do something if 1 or more A's are picked
    -- else
    -- -- do something when 0 are picked

    Extending on that you can know how many instances are picked with the .pickedCount expression. But again, bear in mind that an event won't run if no instances are picked so you still need to utilize else.

    for each objB
    -- objA: variable=ObjB.uid
    -- -- text: append objA.pickedCount&" instances picked"&newline
    -- else
    -- -- text: append "0 instances picked"&newline
  • Probably a bug then. Perhaps it’s not really used often enough to be noticed before.

  • You probably can get some more info about what didn’t work by looking at the browser console. Shift+ctrl+ i in chrome and edge.

    There are loads of limits and restrictions with web stuff. Generally i think iframes prefer urls with the same origin as your games url. If the url has a different origin then there may be a different set of rules and restrictions for that. Google could even block itself from loading from inside an iframe i’d imagine. It’s all likely very similar to the limit of loading images from different origins (CORS).

    You can refer to the mdn site for details or stackoverflow for some more specific solutions perhaps.

    In the case of Google supposedly this link would work based on someone on stackoverflow, but I haven’t tested.

    "https://www.google.com/webhp?igu=1"

  • Ah, I’ll pull the link for now then.

    Edit:

    Updated link to work with your example too. I should have tested more.

    If files are reported as missing in the generated c3p I'll keep the link striked out for now. I haven't seen errors like that, but I may just need to test on a heavier project. If it's an issue with the jszip library then maybe switching to zip.js (which c3 uses) would be an option.

  • What if you use normal blending instead of additive and mess with the opacity a bit?

    Or maybe use an off white for the background?

    You could also try staying with additive and placing the fire on its own layer, then make that layer black and not transparent, and finally add an effect like “screen” or something to the layer.

  • dop2000

    I wanted to experiment with modifying zip files, and the idea of cropping rle data sounded interesting so here's something similar to your script that runs on c3p files directly using a js zip library.

    To use you select a c3p file, it crops all the tilemaps, and finally downloads a modified copy. yourGame.c3p -> yourGame_tilemaps_cropped.c3p

    https://www.dropbox.com/scl/fi/bq5x4pphbsdil2p16ox6t/c3p_tilemap_cropper.c3p?rlkey=jsag5662smgxbpl2leos633hy&st=9je4x6p0

    Edit:

    Pulling for now since there are issues beyond my testing.

  • What’s amiss with the image? I’m not able to follow what you see as an issue.

    Should both gears have their own outline instead being outlined as if they were merged first? That would mainly be a matter of adding the effect to the objects individually instead of the layer.

    Otherwise I’m not sure what you’re describing.

  • It should be automatic to just crop when resizing. If they want to preserve the outside tiles in case of accidental resizes it should be part of the undo stack or strictly temporary instead of never cropping smaller ever.

  • I don’t think that it’s something that can be debugged from videos or even screenshots of events. Generally, more events means it takes more effort to get familiar with what you’re doing before even being able to debug it.

    Since it sounds like it’s become complex and is hard to debug you could rewrite it from scratch after working out on paper exactly what you want it to do. Then just do a bunch of tests to verify it’s working as expected as you actually add the events. That’s my usual strategy when making stuff.

    Or you could outline how you want it to work and I’m sure there are lots of users that would give suggestions or examples how they would do it.

    Personally I’d make such an inventory with sprites instead of arrays. I’d make two sprites: slot and item. Then I’d place instances of the slot sprite all over and place items on top of them. You could indicate if slots are occupied or not and the number of items with some instance variables.

    Then with minimal events you could place items into slots, or swap out the item you’re holding with the one in the slot. But ultimately it’s up to you how you want to go about it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Kudos for finding the cause of your projects running out of memory.

    Can’t it just be reported as a bug so it gets fixed? Seems like an oversight that space gets reserved for the biggest we’ve resized a tilemap instead of only storing the visible ones used.

  • I haven’t had this issue but hopefully it’s investigated to some degree. If it works most of the time then the glitch could be something we are never able to find repeatable steps for.

    Maybe it’s too much to expect, but I’d hope that sometimes the codebase is combed over to find issues instead of only addressing repeatable issues as they come up from users.

    I’m probably a bit salty about bugs because of some unleaded software that I’m forced to use that seems to deteriorate more with every update.