R0J0hound's Recent Forum Activity

  • That’s a a bit much to mentally sort through just from reading, sorry.

    The process to fix it should be fairly straightforward once you get used to it.

    The error is you’re not passing an expected type to the function on this line:

    runtime.collisions.testOverlap(this, otherInst)

    From the error it’s expecting a IWorldInstance type but is getting something else. It’s not clear from the error which parameter is incorrect, but the column:line is included in the error message so you could follow that to see.

    So that’s why I asked what type is being passed. Assuming you did that console.log(this) inside the same function that calls the testOverlap then the type of “this” is DrawingInstance which you define in instance.js and is an extension of ISDKWorldInstanceBase. And that apparently is an extension of IWorldInstance, so the first parameter should be good?

    Maybe the second parameter otherInst is the wrong type? But again figuring this all out piecewise and mentally is probably a futile effort.

    You could try posting your wip addon and time permitting someone could resolve the error.

  • Index is the initial frame index you refer to in your initial post.

  • A c3addon is just a zip file.

    It’s probably not working because when you compress it again you’re including the folder. You just need the files in the folder. But that’s just a guess.

  • I mean it sounds like you have the right idea.

    For example you could use tokenat to map 0-5 to another value, and do it differently per team.

    Compare Team=0
    — Frame = int(tokenat(“0,1,2,3,4,5”, index, “,”))
    Else
    Compare Team=1
    — Frame = int(tokenat(“6,7,8,9,10,11”, index, “,”))

    Or you can reduce that to just:

    Frame =6*team+index

    If that makes sense.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.