How does system picking works?

0 favourites
  • 3 posts
From the Asset Store
Create complex dialogues with ease with this tool/template!
  • Hello! I am trying to implement a sprite mirroring in conjunction with the pathfinding behavior. If I try to pick instances with the system condition like this

    sprites only get mirrored but do not revert to their unmirrored state.

    However, if I use a normal/object picking, everything works as expected. Here is the script

    The problem is that I do not want to revert to every tick hack in order to synchronize the custom instance variable with behavior defined variable. It is not an elegant solution and it wastes CPU and memory.

    A side question: is there a way to test for the value of behavior defined instance variable - eg. MovingAngle of pathfinding behavior - directly in the object's condition? Currently, I can only see a way to test custom instance variables with "Compare instance variable" condition.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your worker.pathfinding.currentnode< worker.pathfinding.currentnode+1 then you are going left?

    I mean the x of those nodes.

    [attachment=0:3l5dwwcr][/attachment:3l5dwwcr]

  • Thx very much Newt for the idea I was struggling for the same reason as Lunarovich, my sprites "sometimes" wouldn´t get mirrored when using pathfinding.movingAngle with some angle value conditions.

    Added some "for each" to update the movement status for my sprites and replaced your first section with simply

    sprite.X > sprite.Pathfinding.NodeXAt(collBox_breedling.Pathfinding.CurrentNode) // Action: Sprite set Mirrored

    now they always face the right direction

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)