R0J0hound's Recent Forum Activity

  • The gist of it is the jelly object is basically made of a bunch of individual physics objects and they are connected together with a bunch of springs and some volume preserving springs. That’s what drives the underlying motion of it all. The visual part is done with a mesh distort on a sprite.

    As you can see in the example it’s fairly involved. There are newer examples floating around too with various improvements and simplifications.

    Edit:

    Here’s a cool video that explains how similar physics can be done.

    m.youtube.com/watch

    Mesh distort in c3 is basically just a 2d grid that you can distort things with. Making it into other shapes requires some creativity.

  • Put the wait in another sub event after the other one.

  • Just because something isn’t sold anymore doesn’t mean it should be free.

  • When using js in construct bear in mind you have to get used to a lot more debugging.

    Probably your issue is a construct array object isn’t a js array. If you get the array instance from js these are the methods you have access to:

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/array

    Basically just getters and setters.

  • The social media apis do seem to change frequently so I’d guess the plugins are outdated so don’t work right anymore? I don’t have social media so this is purely speculation and I can’t test. Apart from what the docs, tutorials or examples show I can’t think of that there would be anything non intuitive you’d have to do.

    There could be more updated third party addons to do the sharing. Another option could be to just use those social media apis via js directly.

  • Cubic() basically gives a cubic bezier spline where the two middle values are just control points. To have the control points land on the curve you could use Catmull-rom splines. You can find the formula for that online.

    Alternately you could expand cubic out to its actual formula and calculate what values to use for the second and third parameters so the curve lands on the control points.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I only vaguely remember what the code was and haven’t been on my computer in weeks. But let’s see.

    I think I meant that you’d need to add the uvs to the mesh object when loading the obj file. The uv array would need to be 2/3 the length of the verts array to work. And as I recall it first is in a normal js array then that’s put into a typed array to be useable with webgl.

    I still say it’s better/simpler to just open the obj file in a 3d modeler and re-export it with uv’s.

    That other two triangle thing is unrelated. The plug-in draws to a texture and those two triangles make up a quad so that texture can be drawn to the screen.

  • Another way is to set the gravity to zero and manually apply acceleration to the objects. VelocityY = velocityY + gravity*dt

    You can use forces instead where force=mass*gravity but the values for many things in the physics behavior are off by factors of 50 so you may need to scale values accordingly.

    You could also in concept undo any motion do to gravity by manually applying a reverse acceleration.

    Vy = vy-gravity*dt/2

    Y = y - vy*dt

    Vy = vy-gravity*dt/2

    However that would only work if the object didn’t have any collisions and you may lose a little precision from the calculations.

    You also possibly could apply a force to counteract gravity but the values need to be spot on.

    Anyways that’s just some alternate ideas if you need a more immediate solution.

  • My guess would be to look into the json your website is generating.

    Maybe it’s mistakenly putting a width of 370 but it only contains 342 elements in the array in the json?

    Im guessing the size part of the json is largely ignored when it loads and instead it relies on the size of the data? It’s something you can test.

  • Ah, maybe the sdk2 update broke something with the scripting interface? I can’t test, I haven’t really used my computer in weeks.

    You could file a bug report. Or if you’re up for some deeper testing on your end before you report you could spot check some older releases in case it’s a regression. I’d check the versions before the sdk2 changes started.

    An unsupported way to do it is to bypass the script interface of the plugin and access the object instance directly. However that seems to be officially frowned on and they are trying to hide how to do that more.

    Worst case you could just access the values from the event sheet side. If you want to access it from JavaScript you could make an event sheet function to get the values and call it from js.

  • It’s probably when you’re accessing it that’s the issue. I’m guessing that onbeforeprojectstart runs before the the plugin’s object type is initialized. I mean since it’s undefined when you call it that makes sense.

    Maybe try calling it from the runonstartup callback, or at least some point after things are defined.

    construct.net/en/make-games/manuals/construct-3/scripting/using-scripting/script-files

  • I mean that has nothing to do with construct. But you can wait on their reply if they even do reply.

    Here is the current standard way of writing to the clipboard from the browser if you want something to mess with now.

    developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText

    If it doesn’t work then you need to somehow look at the errors and exemptions that are usually shown on the browser console. If you can’t access the browser console then you need to display it another way. Worst case clipboard access isn’t supported in the browser engine that app you’re using. Only workaround then is to make an editbox with the text and let the user select and copy it. Or you could do your own fake clipboard if you’re only copying/pasting within your game.