Magistross's Forum Posts

  • Oh... I see. Since in my example conditions are set top-to-bottom, left-to-right, some conditions of "opposing" tiles get wrongly overridden.

    You'd need to add another group of loops to add specific condition for L shapes, and even a third set of loops if you plan on having U shapes.

    Doing everything in a single pass might be possible, but I'm getting a headache just thinking about it! Haha !

  • A 4 corners wall ? You mean a square ? I believe it shouldn't be passable to begin with ! :P

    How do you want the system to react ?

  • It obviously makes sense to limit expression functions to functions with a return value, but is there any good reason to restrict action functions to functions without a return value ?

  • It's basically a queue based flood-fill algorithm. It was perfectly suited for this kind of situation! ;)

  • Hi Microbex, did you mean something like this :

    dropbox.com/s/e0lj64hx93cx4wc/array%20test%20grid.c3p

    What I basically did is add an 1D array (akin to a list) that get populated with tiles that need to propagate power.

  • It seems function with return values can only be called by expression, which is unfortunate. I guess you could circumvent this limitation by using a useless expression like "Set dummyValue to Functions.myFunction", but it is rather annoying.

  • Did you actually add parameters to the function ? This is an additionnal step that you did not have to do before. Right-click on the Function event, and "Add parameter".

  • Inside your function event, you'll have access to your parameters as expressions directly under System > Global & Local variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • New function's parameters are treated as local variables.

  • I've done something like this a while back.

    This thread should cover it.

    construct.net/en/forum/game-development/game-development-design-ideas-25/simple-grid-movement-128763

  • mOOnpunk Both actions indeed work under the C2 runtime. However, I can't talk for the C3 runtime. Have you noticed any error in the console ?

  • radyan Nice, looks like my dialogue utility on steroids !

  • agouibo There seems to be some discrepencies between how the SpriteFont object measure its text between the C2 and C3 runtime.

    My template use a temporary SpriteFont object to measure single lines of text and insert line breaks accordingly so they occurs between complete words only. However, even if this temporary object is set to have a width of 5000, the C3 runtime seems to execute the "TextWidth" expression still with the default width of the SpriteFont object. Everything breaks down and no line breaks get inserted.

    A dirty workaround for this is to set the SpriteFont object's default width to 5000 or something, so the "TextWidth" expression works as it should.

  • There is definitely something wrong with the "Dialogue_ProcessText" function last part (the one that pre-insert line breaks so word-wrapping is flawless). I suspect the "TextWidth" expression from the SpriteFont object to be the culprit...

    I'd need to debug it thoroughly by comparing behaviors from C2 and C3 runtime, but alas my free time isn't what it used to be...

  • You need to actually add the "jQuery" object. Although it's an empty object devoid of ACEs and visual representation, its presence will ensure that jQuery is present throughout the project.