0 Favourites

How does system picking works?

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

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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread sticky
4,517 857,340
Tinimations's avatar
Tinimations
Unread sticky
1,586 437,294
matriax's avatar
matriax
Unread hot topic
378 33,258
part12studios's avatar
part12studios