TELLES0808's Forum Posts

  • mindfaQ, I noticed after posting, thx!

    Excal,

    I did a sample a time ago, for a friend, and may it match perfectly for you.

    It's using pathfinder, but it don't will make any difference for you, but will make possible to check the distance.

    dl.dropboxusercontent.com/u/47035927/Samples/Path_Distance_Demo.capx

    Enjoy...

    Edited:

    Ashley, I would like ask you if is possible to implement a new function inside the pathfinder behavior?

    Please, consider making a "travel distance" or something similar, so, we will be able to check the shortest and longest paths and improve our AIs.

    I think most of the users needing it will not achieve workarounds like on the sample above.

  • only using plugins.

  • Excal,

    I do not want download your file or analyse your code, because it can be simpler than you're thinking...

    First of all, distance is a trick if you're dealing with a non static object.

    But, I did the job by using instance variables, setting the objects who need to be checking against another object by storing their "Distances" inside this instance variable, then, pick the object with the higher/lower "Distance".

    So:

    = Every tick:

    = For each Obstacle:

    -> Set instance variable "Distance" to [distance(Player.x,Player.y,Obstacle.x,Obstacle.y)]

    = Pick lowest "Distance" from Obstacle:

    -> Do whatever you want...

    Avoid making objects with the same exactly distance, or, the system will sort one of them...

    If it's not possible, simple make an index, so, put inside the "Distance" a dot and plus, an index, like the IID or UID, and the system will always pick the objects with the same distance, but will select the smaller IID or UID or another instance variable, like ID, its your choice...

  • <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Yeah, that was my first thought too, storing coordinates. I was hoping, there was a better solution tho. As i see it, a Recalculate Path action for the pathfinder behavior would be a nice addition.

    I believe there should be a way to determine where is the last node of a path, giving you the destination coordinates.

    dropbox.com/s/2m455kl05q7g0w2/Pathfinding.capx

    You can join the arrows with a line for each unit, and start the line path from the actual position of them.

  • You always can take the boss by its IID, instance variable, or health status, sorting and picking the higher health, or something else.

  • Ashley,

    That's an option to setup only left/right inside the behavior, so, I supposed it was designed to be for horizontal movements '-.-

    Taking a look in the description, you can easily do the same mistake as myself...

    <img src="https://dl.dropboxusercontent.com/u/47035927/temp/screenshot_8dir.png" border="0" />

    When all what I wanted was move object left and right in the canvas, while doing a study for space invaders.

    Do you have any concern about using the platform behavior to simulate the AI of 30 objects on the screen? Didn't tested it yet, but was trying to use the minimum possible to make viable the AI without spending any % of process than the necessary, targeting mobiles.

  • Ashley,

    This is a brand new and fresh installation of Chrome, and reverting back to an older beta, Previewing still working flawless.

    Actually the browser is not using extensions and plugins, also, Previewing with the Debugger it run okay and without the error message.

    --------------------

    Edited: removing and installing Chrome again solved the problem. Thank you!

  • I'm just posting here my comment made on the blog.

    Ashley,

    I started to work in a new game to use and abuse of the new features, and learn from it.

    Using the TMX system to map a stage is awesome, and mix it with invisible solid shapes is amazing.

    Looking for the feature, like it's actually, I just missed animated tiles. Using your philosophy of commas, it could use something like this:

    X = Grass / Earth;

    Y = Water;

    XXX XXX YY XXX

    While Y use 3 consecutive tiles to be animated, with 5 fps of speed, so, it could be, in the tileset, an arrangement like this.

    X Y1 Y2 Y3

    And inside the code with commas, 6x1, 3x2x3, 3x1, and then, setting the fps globally for a tileset object, so, whenever it call a third part of the multiplication.

    Plus, if it turn too much complex, you can have it turned into an auto-tile system, like RPG Maker did, using this type of procedural:

    6x1, 2x3c, 3x1 (where c is an alternative index of a pre-formated tileset, see below)

    blog.rpgmakerweb.com/tutorials/anatomy-of-an-autotile/

    It's can be a special part of the software, where it will always be displaying animated tiles with the same exactly setup, making the image format standard and easy to use, also, smaller tilesets specially designed for animations like water, doors, etc.

    Plus, auto-tiles have the nice behavior of know where the edges are, and fill them always when possible.

    blog.rpgmakerweb.com/wp-content/uploads/2012/01/AT-OSeperate.png

    And on platform games, make water surfaces with those animated tiles, also auto-tiling the scenario would be great!

    I'm very excited with this new feature, and everyone here sent you a special hug and thank you!

  • Maybe a better idea is a repository, where the authors can keep tracking their releases and releases notes, with an auto-updater.

    This already exist, but it's not officially used here.

  • Link to .capx file (required!):

    dl.dropboxusercontent.com/u/47035927/temp/bug7.capx

    Steps to reproduce:

    1. Add the 8 direction behavior on any object on the canvas

    2. Preview

    3. Observe in the bottom a offset of 1 pixel

    Observed result:

    I'm studying and learning about the new features, while testing and reporting here some little issues.

    What is happening in this file is one pixel offset while using 8 direction behavior on objects, when previewing it in the browser.

    Expected result:

    Work without this offset, because it can glitch the graphics.

    Browsers affected:

    Chrome: yes

    Operating system & service pack:

    Windows 8.1

    Construct 2 version:

        R149

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Link to .capx file (required!):

    A blank and new project. Just hit to make a new project.

    Steps to reproduce:

    1. Press F5 after creating the new project...

    Observed result:

    It don't happen while previewing with the debbuger layout.

    Chrome will popup a window like this:

    <img src="https://dl.dropboxusercontent.com/u/47035927/temp/bug.png" border="0" />

    <img src="https://dl.dropboxusercontent.com/u/47035927/temp/bug2.png" border="0" />

    Expected result:

    Not showing the message

    Browsers affected:

    Chrome: yes

    Operating system & service pack:

    Windows 8.1

    Construct 2 version:

        R149

  • That's another use of variables, local or global.

    The easiest way is check if the array.at(X,Y) is where you want start to place the ore, also checking if the array.at(x,y) is bigger than the range wanted.

    Checking it before start the events of placement, and configuring each placement method to place the desired tiles there is the easiest way.

    So, you'll be able, for example, to make grass on the top tiles, while filled dirt blocks inside the ground, by checking their Y with the conditionals.

  • You can setup the array and load it whenever you want, it will still the same, so, make a global variable like CREATION_WORLD, check if this variable is setup to 0 before creating the world by the first time, then, setup it to 1, and the code will never run again.

    GLOBAL VAR -> CREATION_WORLD = 0;

    EVENTS:

    = Run once while true;

    = CREATION_WORLD = 0;

    --> Generate your world with the array;

    --> Set CREATION_WORLD = 1;

  • Hello,

    I'm learning about regex right now and have particular interest in any CAPX with samples of use.

    Or, if someone in the forum have a tutorial introducing to the use of Regex on C2, I would appreciate it too.

    Reading the manual, it's saying in short words what is described inside C2, while hovering the mouse over the Regex condition, but, still missing a sample of use.

    For example, while completing the form, it ask for:

    "String"; "Regex"; "Flags";

    But, to compare the given string, inside the regex field, how it will work, what arguments it need, how to construct the expression?