EberKain's Recent Forum Activity

  • I was under the impression that the pathfinding grid would only take the solids in the same layer into account. It would make sense from the way the manual is written that the pathfinding object takes all solids when building the grid. That will complicate things. I need the ability to have seperate pathfinding grids. Think about the different floors of a house, each can have people moving around, each with different object arrangements.

    I suppose I could create a different object with the pathfinding behavior for each floor, and give each slightly different pathfinding values so they are tracked separately. The pathing is based on a tilemap, so I could just add the tilemap for each floor as the obstacle for that floors pathfinding behavior. Add each object to the character container and pin the character to it, then just call the object that matches the floor the character is on to move the character with pathfinding specific to that floor. It should work, but will make adding single objects more complicated since there is no action to remove a specific obstacle, I guess I could keep a list of every obstacle for each floor and if one is removed, remove it from the list, wipe the pathfinding obstacles and readd them all on the list. Should be able to get away with only rebuilding the area of the grid that was effected. If its alot of objects then the removing action could start to get expensive.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The pathfinding page makes no mention of how the Pathfinding behavior handles multiple layers. Does it keep a separate grid for each layer of the game?

    If I add two instances of an object with the behavior to different layers with different obstacles, how will they behave?

  • I'm using an array object to hold all the data about how the objects in my game act. Instead of entering the data into the array inside the code I would like to work out a way to go from a google spreadsheet to a file that I can load with the AJAX object, and then load into the array object. I know it sounds like alot, but for the number of different object types I plan to have, I would much rather have the object data setup in a spreadsheet to make it easier to work with.

    My intention is to deploy as a desktop application using NW.js

  • Thanks for sharing, I am definitely going to use a couple things in the game I'm working on.

  • I swear I tried that this morning, I could get those options for the collision polygon, but not for the origin point.

    It took me the week to get all the animations imported, layered and synced up. Right now they have the default origin point on everything.

    I had an idea though, instead of changing the animations, I think I'll add a new empty sprite to the character container and attach the pathfinding to that, then pin the rest of the character layers to the new sprite, but offset the pin point. Should have the same effect as moving the origin of all the artwork, without having to move the origin.

  • As a test I tried setting my min zoom to 0.00001 and it lets me zoom out to the point where I can't even see my game anymore. When I zoom back in its fine.

  • I'm totally new to C2, but do have some programming experience. This is what I did for zoom in my game.

  • It seems like the pathfinding behavior moves the object based on its center and does not respect the self object collision polygon, and I see no way to enable that behavior. Someone please correct me if I am wrong. That being the case, for my application I will need to adjust the origin point of the sprite being displayed to make it look correct. The problem is my character sprite has oh about, 2000+ individual frames. Took me the better part of a week to get it setup correctly, and I still have alot more animations to add to the character. I see no way to apply an origin point change to multiple frames, or better yet apply an origin change to an entire sprite.

  • Ok, thanks. I will test when I get home and let you know.

  • I should have said, the two overlapping images are different objects types, not different instances of the same object. One is a 9-split and one is a tile grid. I really did spend about an hour searching google for an example on how to do it. I think I can make it work with a global variable and an on tick event, but I was hoping for a more elegant solution.

  • Have overlapping sprites, I only want the 'on object clicked' to fire for the top most one, currently it fires for every object under the mouse. EX: Clicking on a UI elements still fires the click event for the background object.

EberKain's avatar

EberKain

Member since 22 Aug, 2015

None one is following EberKain yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies