Magistross's Recent Forum Activity

  • Thanks It feels like I corrected this particular bug for the third time! That's what you get for copy pasting code instead of working with reusable code...

    I finally updated the basic example to behave correcly with the newer version of the plugin (just had to configure the behavior to synchronous mode).

    I also went ahead and added an expression to retrieve the cost from a tile coordinate and a condition to test whether or not a tile is walkable.

    New version here.

  • Using a breadth-first search might be more appropriate to find all possible moves, and then I guess you could use the pathfinding only once to go to the selected tile.

  • You might want to try your luck with the Browser object's "On supsended" and "On resumed" triggers.

  • It's crude, but you could add an event that unfocus the textbox every tick, and add another one that focus it on any keypress.

  • Hi Mante!

    After you change the spritefont's sprite, you need to make sure the properties properly reflect the new sprite, otherwise some weird stuff are bound to happen. Also, you need to change a few variables accordingly, at the very least, DIALOGUE_LINEHEIGHT and DIALOGUE_MARGIN should be tweaked to smaller values.

    The DIALOGUE_POSITIONX variable represents the top-left corner of the dialogue box, so this value should not be set to a centered point. For the dialogue box to be centered it should be "screenwidth / 2 - DIALOGUE_WIDTH / 2".

    Hope this helps !

  • It's the classic case of "newly created objects can't be picked until the next top-level event". This old post from R0J0hound sums it up.

    What happens is that no array "exists" when the Retrieve function is called after the loading is done. The quickest and dirtiest trick to circumvent this problem is to add a "Wait 0" just before the function call so that it get postponed to the next tick, when the newly created array will be available.

    You could still do it all in one tick, but that would mean adding a lot of logic to your existing to code to now work with the UIDs of the array. Object picking by UID works even with newly created object.

  • You need to use AJAX to load the file. The FileChooser.FileURLAt(0) expression will only give you the URL that AJAX can use to load the file.

    It seemed to somewhat work when I added AJAX file loading, however something was not quite right with the first page. Did not investigate further, you seem pretty capable, you will surely figure it out on your own.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • However, it's not true in a Construct 2/3 context. Arrays aren't typed and are also dynamic.

  • Well, if you need a simple list of arrays, you could create multiple instances of an array type and treat each instance separately according to its IID (or preferably, an instance variable you set yourself).

  • Yes, it's only a matter of adapting the Sprite Font to display cyrillic characters. The current charset is limited to the default one, however you can expand it as much as you like. Here's the manual entry for the Sprite Font object.

  • Off the top of my head I'd say it's probably related to the order of operations. Try encasing the ternary operator in parenthesis.

    "Hello" & newline & (Variable1 = "Paul" ? "Paul" : "Not Paul")[/code:2fwttllf]
  • Whenever you are doing some sort of calculation every tick, you will most likely need to take dt into consideration.

    Executing "Set X to Self.X + 6" every tick will make your sprite move 6 pixels per tick to the right. Which is ~360 pixels per second on a ~60 fps machine. So if you want your sprite to move 360 pixels per second to the right, whatever the framerate is, then simply do "Set X to Self.X + 360 * dt".

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies