Laurent's Forum Posts

  • Thank you very much for your answers.

    dop2000 I've got a topic related to this one here and I'm sure you could be of help to sort the question out : https://www.construct.net/en/forum/construct-3/how-do-i-8/prevent-multiple-enemies-166731

    Thank you !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Sami424

    Could you be more specific ?

  • I've customized an hex-based multiple enemy move pathfinding engine and turned it to turn based. Everything is fine except enemies overlap.

    Enemies are multiple instances of a sprite. Pathfinding is not on the enemy sprite but on a independent sprite the enemy sprite is attached to.

    Obstacles for Enemy pathfinding are : Terrain (here Water hexagons) and all other Enemies' hexagons

    when every Enemy's hexagons are Solid (including current Enemy), pathfinding can not be process because current Enemy's own hex is Solid. Pathfinding stops here. So in order to have Pathfinding to work, I have to disable current Enemy hexagon but keep all the others enemies hex Solid.

    Here is how the sequence is meant to work :

    - The Enemies don't move.

    - *each hexagon where an Enemy instance stands becomes Solid, creating an obstacle map on the game board.*

    - Pathfinding for Enemy instance 1 is calculated

    - Enemy instance 1 moves

    - Enemy instance stops

    - *Hexagon where Enemy instance stops becomes Solid*. Obstacle map changes.

    - Repeat to next Enemy instance until every Enemy has moved.

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

    Everything is fine except I couldn't find any way to have de steps marked ** to work. Anyone has an idea ?

    Capx is here :

    dropbox.com/s/9ivnc6y16m0sxzz/HexagonMovement_2Enemie_TurnBased.c3p

  • OK,

    I went deeper into this after my last post and I came out with a turn-based engine where enemies move one after the other.

    Code is enclosed here :

    https://www.dropbox.com/s/9ivnc6y16m0sxzz/HexagonMovement_2Enemie_TurnBased.c3p?dl=0

    So far, unfortunately, I have a problem with the pathfinding obstacle map generated from Enemies positions on the game board.

    Here's is how the pathfinding routine works :

    - Obstacles for Enemy pathfinding are : Terrain (here Water hexagons) and all other Enemies' hexagons

    - Unfortunately, when every Enemy's hexagons are Solid (including current Enemy), pathfinding can not be process because current Enemy's own hex is Solid. Pathfinding stops here.

    - So in order to have Pathfinding to work, we have to disable current Enemy hexagon but keep all the others enemies hex.

    I tried several approaches using the functions in the SetBlockSolid group but none of them worked.

  • For my game, I need to pick all the instances of a sprite but not the active one.

    The active one is the one that actions are applied to at a given click.

    How can I do that ?

    Tagged:

  • 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.

  • 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 ?