R0J0hound's Forum Posts

  • 25 with no subscription and not logged in.

    50 if you’re logged in.

    Unlimited with a subscription.

    That’s it.

  • You can change the export file structure in the project settings.

    You’ll have to give the exact events using sprite.count to get an exact answer, but the behavior is likely by design and is related to how picking works and how created objects aren’t immediately available for general picking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    If you use the code tags around the pasted JavaScript it will preserve the indents and be easier to read.

    If the error is it expected a world instance what type did it get instead?

    Sometimes I console.log(this) to be able to browse what’s available. Works well when the code is run once otherwise the console will get spammed. Another option is utilizing the browser debugger. You’d preview, open the browser’s debugger, navigate to your code and add a breakpoint in your function. Or something like that. Anyways, that would let you inspect the values of everything at that point.

    The docs are useful but being able to browse the objects directly is useful for seeing what properties and methods are available.

  • Or maybe 1000*a+100*b+10*c+d.

  • The easiest solution would be to just use textInput to display the text and use css to hide the background of the textbox. You can even rotate in 3d with some css to not have it perfectly horizontal.

    Anyways, that would give you all the text editing, highlighting and cursor for free. If at all possible I’d recommend trying to do it this way and forgo the text being curved to the hand.

    If you want to display the text another way, or have it distorted, you’ll be opening up a big can of worms which basically amounts making your own textInput and text renderer from scratch.

  • That won’t help with any of those things though. It’s merely a clipboard format that is used by construct to copy events. It’s not meant to be human readable or writeable.

    The ids are mostly arbitrary although they are typically close to the name of things but they aren’t really useful to know at all as a human. They are used internally by construct to lookup actual names of things in whatever language mostly.

    The manual and the event editor lists all the actions, conditions and expressions if you need a reference of what’s available.

    Events are their own thing that don’t convert to a lower level language. Generally it’s similar to a traditionally typed language, but it also has a picking system on top of that which is rather unique. The manual explains how events work for the most part, but some actions or conditions can do their own thing that deviate from common behaviors.

    Theres also JavaScript and typescript you can use to do basically what events do but in a different way. There isn’t always feature parity though. For example you’d have to do your own object picking in events or do a hybrid approach with events.

    Advanced collaborators likely won’t care about whether you use code or events. All they care about is how things are meant to work and they can implement it in any way they fancy.

  • That just means your browser is clearing cookies/cache when it restarts. Why?

    Maybe it’s a browser setting that does that. Maybe your hard drive is low on space and windows is automatically cleaning up temporary files, which include cookies, to free up space. Or maybe it’s some other program/browser addon that’s triggering the cleanup.

    You’d just need to check around.

  • With an async function you can’t return a value, you’d just set a value somewhere from the function.

  • Here’s one possible solution.

    First step is to find the lowest x and y of each group of blocks and subtract that from the xy of each block. Next you can add the xy pairs to dictionary for one group, and remove them with the other. If it’s empty both sets of blocks are in the same shape.

    Var xmin=0
    Var ymin=0
    
    Every tick
    — dictionary: clear
    
    For each block1
    — set xmin to loopindex=0?block1.x:min(xmin,block1.x)
    — set ymin to loopindex=0?block1.y:min(ymin,block1.y)
    
    For each block1
    — dictionary: add key (block1.x-xmin)&”,”&(block1.y-ymin) with value 0
    
    For each block2
    — set xmin to loopindex=0?block2.x:min(xmin,block2.x)
    — set ymin to loopindex=0?block2.y:min(ymin,block2.y)
    
    For each block2
    — dictionary: remove key (block2.x-xmin)&”,”&(block2.y-ymin)
    
    Dictionary: is empty
    — blocks are in same configuration

    Only time that wouldn’t work is if multiple block1’s were in the same position.

    Another option is to convert both sets of blocks to arrays. You’ll need the bounding box (min,max xy) of both, then populate the arrays. Then you could loop over the arrays and check if each is identical in both. As a quick easy out you can check the sizes first.

  • Unique workflow. That’s probably the kind of thing you’d need to do yourself as you’ve noticed it’s very time consuming to do. Even if it could be done in an automated way, the possibility of renaming the type/behavior or variables in general would make it infeasible to do.

    What you can do is create a project to copy from that you build as you go since there would be some actions and conditions used more than others. Overall that would let you try that workflow more and firsthand find pros and cons with it.

  • Don’t mind at all. It was meant as a public domain template of sorts. Just be sure to change the plugin id.

  • It’s short enough and simple enough you can try changing it and see. I thought defining the paths with sprites was simpler. I won’t be making an array version.

  • It’s just built on top of the sdk template which specifies version 2 in the c3 addon.json. I’d assume the rest of the template is v2 compliant, but it’s not reasonable for us to find and update parts of the template that may use v1 stuff. Beyond that my goal is just to get it working.

    You can look at the runtime portions of official plugins in the browser console but the edit time portions are minified.

  • I finally fought through the build process to make a plugin. It's based on the drawing plugin template but a bit more complete so maybe it may be useful to you.

    dropbox.com/scl/fi/c8nu95x3r8mdjw15z7dcw/convexPolygon.c3addon

    It renders convex polygons, and lets you change the array json of the points at edittime and runtime. Also when it does it changes the size and origin so that the bounding box/quad is as small as possible around the points.

    I'm not encountering the bounding box issue you had.

    When you add it initially it's white so you'll want to change the color right after to add it. I wanted to set the color with code, like the spritefont plugin does, but that doesn't seem to be an option somehow. Also it looks like you have to manually add ACES to set the blend mode with events.

    I almost got used to modifying multiple files to add something. There really is a lot of tedium that you have to wade through to even get to the point of doing something interesting. The loop of modifying files, packaging them into a c3addon, loading it into c3 and restarting c3 to test it really takes a toll. Getting past the vague errors to even get the plugin to install was the biggest breakthrough I'd say.

    I found the SDK manual helpful in parts but overall hard to navigate, but that was mainly due to the sheer amount of different classes. When I got the the runtime portion the SDK docs stopped being helpful and had to resort to browsing code in the debug console. Turns out at runtime the renderer function names start with lowercase letters while edittime starts with Uppercase. Also it found it odd that the draw function had to be done differently at runtime than edittime.