leooleary11's Forum Posts

  • Thank you for the help. Worker is already disabled, and I tried making the sprite smaller, and while it did seem like it made the delay shorter, it's still too large a gap. I could try making it even smaller, but it's getting to the point were any smaller and it would be hard to tell what you're looking at. I'll keep futzing with it to see if I can get it faster, but if not, I'll stick to the sprite loop.

  • I moved the cursor sprite loop code to it's own event sheet to see if that might make it faster. It was originally a subgroup in a large event sheet, so I'm hoping that by making it it's own thing, it'll be able to run faster without having to run a lot of unnecessary code.

    Edit: Nevermind, I'm still getting the same problem where the cursor art doesn't go back to normal.

  • I tried doing what you suggested (using a single object that changes animations), but even though they are all on the same object, it still takes close to 2 seconds when trying to use a new item.

  • Thank you for the suggestions! The original sprite is 50x50, though I resized them in-game to 100x100. They are already in the game, just outside the layout, though I can't delete them as they are needed for code later in the game. I'll try doing the single object with all sprites thing though.

  • Image of the alternative cursor sprite loop using a single for-each loop.

    While using this method though, the calls to "Set cursor from sprite CursorArt" are almost always ignored, resulting in the player's cursor looking like a screwdriver or lump of coal (at least until they try using an item, in which case the cursor sprites function properly)

  • I am making a point-and-click style adventure game where the player can put items in their inventory, and then double-click on those items in order to use them. It does this by changing the mouse style to match the sprite of whatever item they clicked on. However, as the scale of my game has increased, a delay has grown between double-clicking the item and the mouse sprite changing.

    Right now, it there is a full two second delay, which is not only noticeable, but is also causing bugs. But, weirdly, after the first time an item has been used, the next time the player uses that item, the mouse sprite changes immediately. With this in mind, I tried creating a function that looped through every item sprite at the start of the game, and set the mouse sprite to each object. While this loop has gotten rid of the delay, there are now two new problems: one, there is a brief moment at the start of the game where the mouse cursor somewhat noticeably flickers between all the items, and two, there is a low chance that, after the mouse has looped through all the item sprites, the mouse sprite doesn't return to the regular mouse cursor sprite.

    All this to say, is there a simpler way for me to fix this delay problem that doesn't result in more issues? I appreciate any help.

    Link to video showing gameplay without the mouse sprite loop.

    youtu.be/_iLWGeGyhMo

    Link to video showing gameplay with mouse sprite loop working "properly".

    youtu.be/9hfSWYfX0Uw

    All items that can be picked up by the player are a part of the "InvItems" family.

    Image of the code used for the mouse sprite loop. I am aware that it is extremely brute force-y. I originally just had a single for-each member of the InvItems family loop, but I was experiencing the previously mentioned issue (where the mouse sprite would not return to the regular cursor sprite) much more compared to after I changed it to the code pictured.

    If you need any more information, feel free to let me know!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, I've been tweaking it, and though it isn't perfect yet, it's getting closer!

  • Oh also, forgot to mention, I did change the x and y values for the map creator to fit my viewport size, though I'm still experiencing the same problem.

  • I'm trying to make an electrical circuit puzzle for my game. I had come up with a solution, but it used straight brute force (I literally checked the angle of every circuit to make sure they were all facing the right direction). I decided to try and make this more elegant, and ended up on a pathfinding system where the "electricity" actually has to reach the end target. However, I'm now running into an issue where obstacles apparently appear for no reason (at least according to my map), and I have no idea why or how to fix it. Any help would be much appreciated.

    A screenshot of the puzzle in-editor (the green squares are circuit spawners and the two small grey boxes on the right are the targets). The "electricity" (the pathfinding object) spawns in the upper left corner, just above the top-left circuit spawner.

    The puzzle in-game which has been partially solved (there is a clear path from the start to the first/top target)

    The same puzzle shown above, but with my obstacle map active. You can see in the upper-right corner of the puzzle, there are obstacle indicators blocking the electricity's path, even though there shouldn't be any obstacles (the gray boxes) in the way.

    Below is my code.

  • https://www.construct.net/en/forum/construct-3/how-do-i-8/nw-js-exports-black-screen-178842

    Dang alright. Hopefully it'll get fixed in the next update then.

  • or try restarting ur computer

    I tried both of those and, unfortunately, I'm still having the same issue.

  • My game works fine in-engine, but when I export it as a NW.J file and try to run it, it won't load. I checked the console and these two errors always popped up. Does anyone know why this might be happening or how to fix it?

  • >

    Subscribe to Construct videos now

    cool font and attack animations

    however, would you consider adding knockback to enemies when they get hit? I feel it would make the combat feel a lot more weighty and satisfying

    I agree. I'll see if I can implement that. Thanks for the feedback!

  • Here's a trailer to a demo for my game, Vanguard. I took a lot of inspiration from fantasy games like Dungeons and Dragons and had a ton of fun making it! If you're interested in trying it out, there are links to the game in the video's description. Any feedback would be much appreciated!

    Subscribe to Construct videos now
  • So, essentially my problem is that when I export my game to an NW.J file, there are two sounds that are missing from the project, the players footsteps and a stomping sound for my boss. Both sounds are .webm files and both are meant to play at a certain point in an animation (posted below). Does anyone know why this might be happening and how I could fix it?