janbarsk71's Forum Posts

  • 2 posts
  • OK, I changed it so that there is only one target sprites with the instance variable "tar". I call it "target" There are three representations of it, and the instance variable is set to 1, 2 and three for them respectively. The sprite that moves with the Pathfinding Behavior has the variable "var" set to 3. I call it "walker'.

    Then I have these two Events:

    ---

    1:

    System Every 0.3 seconds walker find target to (target.x, target.y)

    walker var=target.tar

    2:

    walker On Pathfinding path found walker Move along path

    ---

    Then nothing happens, so it somehow does not work.

    If, however, I disable or delete the second condition at the first event (walker var=target.tar) so that the instance variables are not used, then it works and "walker" goes for the first one of the targets (because it was created first).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would like a sprite - with the Pathfinding Behavior - to Find Path to one object out of several depending on an instance variable.

    For example, the sprite has instance variable = 2. There are three sprites named "target1", "target2" and "target3". I CAN make it work with three different events with conditions that compare the variable, but I would like this to work out with ONE single Event.

  • 2 posts