SoupOrWorm's Recent Forum Activity

  • The Steamworks addon should actually be easier to use - you don't need a steam_appid.txt file and it includes all its dependencies so it should more or less just work after an export without extra configuration steps. The documentation is here so maybe double check that. If you are still doing extra configuration steps you used to do for Greenworks, make sure you stop doing them for Steamworks, as it might actually break it.

    Thanks for the reply. I actually forgot to do that when I was testing the new plugin, so I don't think that's the issue... I'll keep tinkering a bit and update this if I find the issue.

  • The Greenworks plugin worked perfectly for me, but now that I am transitioning my project to using Steamworks and non-NWjs export options it doesn't seem to be doing anything when I test my project in Steam. Do I need a specific version of the Steam SDK? Could I be missing something else?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • See the "Text editor" example above. "Read" action is asynchronous, you need to wait for "On file operation complete" trigger.

    I think I figured it out, thanks again for the help!

  • You need the FileSystem plugin:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/filesystem

    https://editor.construct.net/#open=file-system-text-editor

    Thanks, it works for saving, but I'm not sure how to check if the file exists or if the loading works.

    This is what I did for saving and loading:

  • A while ago I made a system to store the user's options for my game using dictionaries saved to files using NWjs. The only issue is that I am moving away from exporting as NWjs and instead just using the dedicated Windows, Mac, and Linux options, so it doesn't work anymore. How can I tweak the system so that it still works?

    For clarity, this is an example of saving to the current system:

    Tagged:

  • This should work:

    > For each Button
    ..Mouse cursor over Button : Set scale to 1.1
    ..Else : Set scale to 1
    

    It works, thanks!

  • I've been trying to simplify and optimise my old code, and one way that I did this was to make a "buttons" sprite family and making one event in a universal event sheet that sets "buttons" scale to 1.1 if the cursor is over it, and sets its scale to normal if it isn't, just for a bit of polish.

    The problem is that if you quickly move your mouse from one button to another, both will stay at scale 1.1 until you stop hovering over either. How do I prevent this without manually copying the code for every single button sprite?

  • Main issue I'm seeing is you're not reading the pixel from the right spot. The snapshot size won't be the same size as the drawingCanvas unless the window isn't resized or if the drawing canvas' resolution mode is set to fixed, and the resolution is the same size as the canvas.

    Anyways, a fix would be to convert the coordinates. Instead of

    x = Mouse.x
    y = mouse.y

    use:

    x = Mouse.X*DrawingCanvas.SnapshotWidth/DrawingCanvas.Width
    y = Mouse.Y*DrawingCanvas.SnapshotHeight/DrawingCanvas.Height

    or if the drawing canvas isn't positioned at the top left of the layout:

    x = (Mouse.X-DrawingCanvas.BBoxLeft)*DrawingCanvas.SnapshotWidth/DrawingCanvas.Width
    y = (Mouse.Y-DrawingCanvas.BboxTop)*DrawingCanvas.SnapshotHeight/DrawingCanvas.Height

    https://www.dropbox.com/scl/fi/c9zekz1ru5pzw6u26mxon/read_pixels.c3p?rlkey=haodeqfz3vknri1qz8db4c5bm&st=b0zkb50o

    EDIT:

    Looks like these three expressions are approximately the same. So you could just divide the mouse position by the pixelScale. The fact that all three aren't all the same is another c3 issue but shouldn't matter too much.

    DrawingCanvas.SnapshotWidth/DrawingCanvas.Width

    DrawingCanvas.SnapshotHieght/DrawingCanvas.Height

    1/DrawingCanvas.PixelScale

    Edit2:

    If you manually set the fixed resolution mode size, then don't use pixelScale.

    Works like a charm, thanks!

  • I know that this may sound trivial but I've been trying everything and it will not work for some reason. My goal is to make it so clicking on a mostly blue tile sets the text to "Allied nation" and clicking on a mostly red tile sets it to "Enemy nation."

    I think that a solution to this woudl require someone to look at the code themselves, so here is a link: https://drive.google.com/file/d/1sXZBJ0OCJQ11ka5YeNRmlA601PMR1xI0/view?usp=sharing

    It's only a prototype so there isn't much to look through.

    Tagged:

  • When RedUnit collides with another RedUnit, both of them become isPaused. So event 16 processes two instances of them. And because the engine is so smart, it compares each Marker UnitID with a different RedUnit instance, alternating between them (I assume). As a result, some of the markers remain unpicked.

    Add "For each RedUnit" to event #16. You might need to do the same in some other similar events.

    It works! I am absolutely buying you another coffee for this.

  • I don't know if this will help, but in #16 you might need to move "Set isPaused to false" to the top of the event. Otherwise the whole event will execute several times before it stops. Avoid using "wait" actions in events that run on every tick!

    If that doesn't help, could you share your project file? It's difficult to understand what's going on by screenshots.

    Here you go: https://drive.google.com/file/d/1Q8747Y-_vmOHinae9tWqPQpAQcP9JmVe/view?usp=sharing

  • Below is my code for handling player movement where if the player draws a line from a RedUnit it follows it and then destroys the line. It works perfectly... except for when it doesn't. The line (Marker & LineMove sprites) occasionally just don't delete after the movement either finishes or is interrupted with a collision. It fails about 10% of the time, and when it does only some Marker and LineMove sprites stay.

    Using Debug Layout it looks like the Marker and LineMove sprites are ID'd correctly, so I think there is only 1 other possible culprit that I can think of: the pick condition. Assuming I am right about this, how do I prevent the pick conditions from ever conflicting with one another?

SoupOrWorm's avatar

SoupOrWorm

Member since 7 May, 2021

None one is following SoupOrWorm yet!

Trophy Case

  • 4-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies