playMaker

Author Topic: object position compare  (Read 1068 times)

Practical

  • Playmaker Newbie
  • *
  • Posts: 8
object position compare
« on: December 06, 2019, 04:25:40 PM »
Hi,
I have a big problem (small for most of you guys )))

I have a puzzle made of 6 objects(their position (only x and y) is changed when I click on them. When I finish the puzzle and all of the objects(pieces) are on their proper position, puzzle is solved (they create a certain picture complete).

Now, I don't know how to create FSM chain which can LISTEN this objects x/y positions, waiting for the proper position for each of them, and then when the last object is in its proper place, that it can open last STATE (of my choice).

I am sure there are many ways through PLAYMAKER actions, but I am not familiar with these terms (bool etc.)  :-\ , so the only way is to get help as on the picture.


Thanks for help


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: object position compare
« Reply #1 on: December 08, 2019, 08:49:30 PM »
Hi.
I am not sure why your topic is locked?

But for your case i would use arrays and loop thru the array to check their positions.
you will need 1 array with the objects and 1 array with to correct position (vector 2 or 3)

in the loop (using array get next) get the objects position, then compare with the position set on the array, if false break the loop.
if true continue to next.

if all ar correct it will reach the finished event, you can use that Transition to do what you have to do after all are correct.

Here is a video about playmaker :



Also look to some basic tutorials to get familiar with some of the terms (if you don't know what it is, try to google it :) ) and with playmaker