Magistross's Forum Posts

  • This is the best I could come up with using my lunch time. It looked a bit jerky to me so I tried maybe using an ever expanding tilemap instead of shifting the tiles and the tilemap. Can't decide if it makes things better... see for yourself!

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

    You would of course have to replace the "generateRandomColumn" function by one that fetch meaningful data. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • Well to be fair, pathfinding is a cpu intensive operation. You have to keep it in mind when implementing it, and use it in such a way that actual pathfinding operations are done in an optimized way.

  • The ’ character isn't mapped. It's this character that is used in your json to represent an apostrophe. You can either add a representation for it, replace the ' in the mapping by ’ or replace all ’ occurences in your json with '.

  • Well, in that case, it's easy to do it already. Sending a request is an action, simply wrap it with a call to a function.

    "your condition to send a request" > Call Function: "SendRequest" with param "tag"

    On "SendRequest" > push to array: Param0 and nowtime, ajax: send request

  • Do you mean a trigger that encompass all the other three ?

  • I know it's generally viewed as a "bad idea" but you could use a modified version of the plugin. Here, I've added 3 triggers (AnyCompleted, AnyError, AnyProgress) and an expression (LastTag) to the official AJAX plugin.

    https://dl.dropboxusercontent.com/u/7004246/ajaxEx.zip

  • It's possible, but depending on how many tiles are displayed at once you might hit a performance block. What you basically need to do is loop through all displayed tiles, if any tile with index x,y,z are found, normalize them to the one that should be displayed according to the current System.Time value.

  • Go ahead, glad I could help you. It was a fun challenge too.

  • Heh, I lost quite a lot of time at work today trying to wrap my head around a way to do it. It's hacky, it's wonky, but I think I figured it out! (For single line textbox, at least)

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

    edit: duh, it seems it selection bit doesn't work correctly on Chrome... oh well!

    edit2: scratch that, event reordering corrected the problem

  • A timer behavior on your kanobär sprite would work great.

    kanobär | On created -> Start timer "shoot" for 1.0 (Regular)

    kanobär | On timer "shoot"

    +kanobär | Is on-screen -> Your mirrored and not mirrored code as sub-events

  • It's an incomplete solution but it's pretty good nonetheless. It doesn't allow text selection or movement of the insertion point, but for a login form, it's more than enough indeed.

  • This is a lot more complex to emulate the insertion point and the positioning of it. I really don't think it's possible to do it in fact... given the current functionnalities of the SpriteFont object. We'd need to be able to map a position on the SpriteFont to a character index of the source string.

  • oosyrag Both of these method should work, but the first one is indeed the best. It should also work on mobile whereas the alternative could prove troublesome to get it work on these platforms.

    I think you have to be careful as to how you make the "TextBox" invisible as I believe some methods will make it impossible for it to receive focus and inputs. I tried setting its CSS position to absolute and placing it off-screen. Seems to work pretty well.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Displaying floating point numbers can be troublesome in Javascript. The decimal part often doesn't have an absolute binary representation, which leads to your "weird" behavior. You should always format your numbers before displaying them when you are dealing with decimals. Too bad Construct doesn't offer expressions to deal with that. One way to do it would be to parse the string representation of your numbers, and limit the output to the wanted decimal places.

    Here's a crude example : https://dl.dropboxusercontent.com/u/700 ... ormat.capx