Guif0DA's Recent Forum Activity

  • Attach a project demonstrating the problem:

    drive.google.com/file/d/1thhxU0JTK6b9Q-uQlPnV4L1KF4FOQCzs/view

    The attachment capx is basically the original pathfinding example with a second instance of 'Sprite' which has the pathfinding behavior. first one is set to collision 'Solid' and the second one to 'Custom', nothing new changed in event sheet.

    Please note: this also occurs on C3.

    The steps to follow to reproduce the problem in the project:

    Just run the game and notice that both the first instance which has solid collision and the second which has custom collision, both follows the same path.

    What you expected to happen:

    the first instance of sprite should follow his path with solid as obstacle, so, it should avoid the solids, the second instance of sprite set as custom on obstacle should just ignore the solids and go straigth to the end of the path, this is because, it has nothing set as obstacle on eventsheet.

    What you observed happening instead:

    both the sprite instances follow the same path of the first instance, if the second, or any other instance has a different option of collision, it will be ignored, they follow only the option set on the first instance, but other properties options of pathinding like speed, acceleration, etc, they each work in an independent way, if first is set to speed, acceleration and desaceleration to 2000 and the second set to 200, the first one will be faster, like it's supposed to be, but the collision properties doesn't work as an independent property.

    Even if you try and use 'Clone object type' on the first instance of sprite, copy the same events and replace the object to the new sprite but instead of solid you set to 'custom' obstacle, it still gonna use 'solid' as an obstacle because of the first sprite.

  • You are creating 4 instances of Sprite2 at the same time. How Sprite is supposed to find path to all four of them?

    One pathfinding instance can have only one active path. If you tell it to find another path, the previous path will be lost.

    Also, Find Path is an asynchronous action. Depending on the map size and other things, it may take different amount of time to find path for different objects. That's why you see only two "a" in the text. On a slower machine or on a larger map it will be just one "a".

    the problem is that as I said this solution was possible with the pathfinder made by rez, maybe because pathfinding is asynchronous it takes more time to calculate the path and then can't handle a path per tick, but I got it to work by basically inverting the order of path, instead of sprite 1 search for 2, when 2 is created, it searches for 1, then each separate sprite can be calculated by their individual time

  • So I'm doing some tests with the pathfinding on C3 to see how much the pathfinding can handle in terms of speed, unfortunately the tests gave me some really bad results, with a simple game code like the image below:

    the text object only append 2 'a' after sprite finds a path instead of 4 when I click with the left mouse button. How can I fix that? is that because of the way the pathfinding code works with those webworkers?

    please note that this also occurs in C2.

    A solution would be really appreciated, I need it to handle like 20+ objects created at a repeat loop. In terms of comparison, the pathfinder behavior tested on c2 made by rez handle this with no problem.

  • Hello, I want to add some changes to the existing pathfinding behavior made by scirra but instead of just change the existing one, I want to first, be able to copy it into a new behavior and later do some changes into the files, but by just copying the original directory into a new one, changing it's name, for example pathfinding2 and also it's name and id in edittime.js to a different one(like pathfiding2) does not work for me when I try to run the game, I get this error:

    "

    Javascript error!

    Uncaught TypeError: Cannot read property 'prototype' of undefined localhost/objrefs.js, line 10 (col 28)

    "

    any1 know what do I need to change exactly into the behavior files to create a new one and also keep the 'original' made by scirra? as I said by just changing the name and id into edittime.js does not work for me, probably I need to change something else, but not sure what..

    thanks in advance :)

  • NVM, just got it, in case some1 need a solution for that too, here's my method:

    system condition> Repeat 'highest variable value' times

    object condition> object variable = loopindex

    system condition> pick random object instance

    action>stop loop(system)

    action>(your other actions here)

  • Hello, I'm looking for a way to pick a random instance among the ones with the lowest variable value, the action 'pick instance with lowest value' doesn't work for me because it always pick the first IID of available instances... the idea is to pick a random, not always the first one.

    Example: Sometimes the lowest value of the variable I want to compare is 0, sometimes is 1, or 2, and so on, I need to be able to detect the lowest value among them and then pick a random instance between them

    anyone might have an idea on how to achieve that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check out this example, it's a C3 project, you can open it in free version of Construct 3, and recreate the code in your game if needed.

    https://www.dropbox.com/s/43c9z9u762l35pw/TileWorkaround_w_Projector2.c3p?dl=0

    thanks u man for your help, it seems the secret is by using the move X pixel by angle right??

  • Hello, right now in Pathfinding behavior, if I find a path from a straight line from A to B, with a grid size of 32x32 and 160px of distance between the them without any obstacles, it will create only 1 node in the path, instead I need to find a solution that makes it create 1 node for each individual grid, that means, in a distance of 160px between Object A to B, with grid size 32x32, instead of 1 node, it creates 5 nodes with the find action from the pathfinding behavior.

    Any1 might have a solution for that??

  • Hello, does this behavior work without tilemap? I'm currently trying to use a different pathfinder behavior from the original because I need it to create a path by grids, with each new path position being in the next grid position and unfortunately, the original one doesn't seems to work for me...

    but in my game, I'm not using tilemaps, I'm creating the map ramdonly with sprites basically, this behavior could work for me?

  • Hello,

    I think some 'simple' keyboard shortcuts for debugger would be really nice, like a shortcut for the primary buttons at the right side of the debug screen(pause/resume, step, save, toggle own window, etc).

    as the development of my project gets bigger, I do use a lot the debug for testing stuffs and check if everything is fine, it's a really usefull tool, and probably a lot of people uses it too for that purpose, sometimes I need to pause very fast after doing some kind of command in my game to test an event for example and if I don't pause fast enough, depending on the type of test I'm doing, I might have to try it again.

  • You do not have permission to view this post

  • can some1 upload the shift effect please??

Guif0DA's avatar

Guif0DA

Member since 5 Dec, 2010

None one is following Guif0DA yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies