Magistross's Forum Posts

  • Since you are using a tilemap, you might be interested in this plugin I made.

  • As a side note, you should probably use "Pick by unique ID" instead of "Pick by evaluation". I believe the former is a tad faster, and cleaner...

  • I might be mistaken, but I believe picking by families ignores containers.

  • There you go, in the form of a recursive function that check in a circular manner around the provided point. It returns the first found zero scanning from top to bottom and left to right.

    https://dl.dropboxusercontent.com/u/700 ... Array.capx

    ramones' answer is better, since my method will possibly revisit already checked Array cells if no suitable candidate was found in the first recursion.

    edit: Just updated the capx with a travesty of a Breadth-First algorithm. It's surprisingly simple, yet, better than my previous version.

  • Ok, that was quite thorough. It shouldn't be too hard for me to come up with something.

  • the initial 0 (which is now 1).

    You lost me there !

    I think it would be easier for me to understand if you made a few examples with different scenarios.

  • What about equality in the distance for the nearest 0 ?

  • Hi Flodcp, thank you for your interest in my template !

    Good questions you have there.

    Adding sound effects for each letter shown is dead easy. Adding a "play sound" at event 81 of the "DialogueEvents" sheet could suffice. However, it could lead to unwanted behavior like tons of sounds playing at once for instant text (delay = 0) or skipped sequence, sometimes the event not really fetching a new char since it's in a "wait" state (Dialogue_Timer > 0), or even the last char fetched that shouldn't trigger a sound since it's basically a EOF (Dialogue_CharIndex = len(AllText)). Having said all that, you can create a sub-event directly under 81 that would deal with all those cases.

    Here's a screenshot of what event and where would it be optimal to place it :

    The local static variable make sure that no sound plays twice in a single tick, so it single-handedly deals with most of the previous issues I mentionned.

    (As a side note, the examples you provided use a different approach than "play a sound for each letter", I can't say for sure, but I believe they are "playing a repeating sound while text is writing". It could be achieved too with my template, but it would be quite different than what I explained)

    For visual effect, the only avenue for us is to use WebGL effects. However, those effects are applied to the spritefont texture as a whole and thus you won't obtain a cool shaky effect on individual characters like in your examples. One possible way to implement WebGL effects would be to add all the desired ones to the spritefont object and activate them with new text commands like {wave}.

    Hope this helps !

  • If you are fetching a server side scripted page, you could also just modify the request there by appending the header.

  • The server(s) you will be trying to reach with AJAX request.

  • You don't do anything from C2, you configure your server to return a response header with "Access-Control-Allow-Origin: *".

    This should help : http://enable-cors.org/server.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alright, I think I got it. I reuploaded the behavior file, here's a direct link for your conveniance : https://dl.dropboxusercontent.com/u/700 ... ilemap.zip

    Please let me know if you find any new bugs!

  • I figured as much... I did the Save and Load to JSON part without ever testing it. Blame me !

    I had to override the setTileAt function for the purpose of my plugin, this override get botched on JSON loading. I'll try to find what's wrong and get back to you when I do.

  • Here, I had an idea and tried it out. Turned out to work pretty good !

    https://dl.dropboxusercontent.com/u/700 ... ering.capx

    I basically systematically put the player behind all overlapping objects, and then find the first object in the z-order list that should be behind the player. Once found, move the player in front of it and then stop iterating the list.

  • For your first question, it's an "inline if" or conditional expression, it goes like this "logical expression ? true expression : false expression". In this case, I multiply the width by -1 if mirrored, or by 1 if not.

    Yep, indeed, it only works with static object because I used a static number in the formula. Give it another go, I changed the formula a bit so it now uses a percentage of the original animation frame width.