Laurent's Forum Posts

  • The point is that the enemies move together at the same time, so the pathfinding obstacle map is in constant changes.

    So I thought about an approach moving the enemies one after another, like a turn based system, so that their pathfinding function would be calculated from a still obstacle map on screen.

    The sequence would be so :

    - The Enemies don't move.

    - each hexagon where an Enemy stands becomes Solid, creating an obstacle map on the screen.

    - Pathfinding for Enemy 1 is calculated

    - Enemy 1 moves and then stops on a hexagon that becomes Solid. Obstacle map changes.

    - Pathfinding for Enemy 2 is calculated from new obstacle map

    - enemy 2 moves and then stops on a hexagon that becomes Solid. Obstacle map changes.

    - Repeat until every Enemy has moved.

    Unfortunately, I'm not good enough programming to achieve this.

  • That's wonderful, winstreak !

    Thank you very much.

    Have you an idea on how to avoid enemy overlaping on each other ?

  • `Hello winstreak

    Thank you very much for taking time to show me about For each!

    Unfortunately, I'm afraid my engine would need a more complex use of for each as you can see in the capx provided with my original post.

    Here's a capture of the enemy move routine that starts when the player movement is completed :

    In my project, since enemies will be spawn randomly runtime, their UID won't be known in advance.

    How can I adapt my engine for 3 enemies ?

  • This wonderful topic here construct.net/en/forum/construct-3/how-do-i-8/enemies-move-unoccupied-tile-156335 gave a good solution to deal with hex based player movement.

    Here's how it works :

    - player and enemy sprite are associated (with container) each with a location sprite (CharacterPath and EnemyPath)

    - These sprite have a Pathfinding behavior directed for the player towards an hexagon on the board, and for the enemy towards the player

    - When while moving the location sprite collides with an hexagon, the caracter/enemy sprite is put on this hexagon.

    I managed to enhance this so that after player's movement, enemy moves in the player direction.

    I now would like to have 3 enemies randomly spawn one after the other onto the board and have them all move towards the player. I was thinking of using a "For each enemy" loop to make them move but have no idea on how to do this.

    Any idea ?

    Here is the capx :

    https://www.dropbox.com/s/mnrf9lkdhn77fwm/HexagonMovement.c3p?dl=0

    Tagged:

  • That's a very nice way to put things up !

    Do you have an idea on how to count tiles traveled upon ?

  • Hello

    This question seems quite simple but I can't have any video play on my project.

    Here's what I do :

    - Import a mp4 video into Videos folder

    - Add a Video object and enter imported video name (without .mp4) into "H.264 source" field

    - Check Autoplay : yes and Initialy visible : yes

    - run preview

    Nothing Happens. Video doesn't even show.

    Is there something I did wrong ?

    Maybe it doesn't run on Preview Mode. But I ulpoaded the exported HTML5 project and it doesn't work either.

    Construct 3 runs on Mac/Chrome

    Tagged:

  • I also have this problem on chrome for Mac (10.14.6).

    Tried emptying cache but issue remains.

    Any clues ?

  • Thank you !

    But I didn't managed to implement it in a construct project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was wondering it was possible to embed a gltf/glb viewer on a layout and have the model pan/rotate by the user with mouse/touch.

    Mikal made an attempt using babylon.js library but it doesn't seem to work anymore : construct.net/en/forum/construct-3/general-discussion-7/babylon-3d-simple-js-147886

    Has anyone walked this path with more success ?

    Tagged:

  • Hello Mikal,

    Any news of your Babylon addon ?

  • Maybe.

    Ashley, do you know about any bug concerning text objet content ? We try to scroll text content longer than text object but the end of the text seem to disappear

  • Hi

    I've been playing with your code, it works very well.

    But I've a point point : when the orignal text is longer that the box, then scrolling doesn't show it when scrolling down.

    Did I forgot something ?

    Here is the link to the file : https://www.dropbox.com/s/l9iebq04ruu2j3p/ScrollTextMaster.c3p?dl=0

  • Actually I do. I have to cycle through theses animations to choose an random one and this info is needed for many other calculation in the game

  • Sprites have an expression AnimationFrameCount that returns the number of frames in a animation but is there an expression that gives the number of animations in a sprite ?

    Tagged:

  • You do not have permission to view this post