playMaker

Author Topic: Compare Vector 2 please HELP  (Read 1011 times)

Practical

  • Playmaker Newbie
  • *
  • Posts: 8
Compare Vector 2 please HELP
« on: December 07, 2019, 09:11:19 AM »
Hi,

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, probably with Vector2 compare, Bool true false,  or similar, but I cant find any practical explanation and I am stuck.

Thanks

P.S. You don't have to read this (related to my problem YES but general):
My opinion is that nobody ever manage to properly explain in one simple example with objects involved - how do you use variables. It seems that Playmaker is just a second version of Unity coding, because all I see is variable on variable on variable, going in circles, there is no logic in establishing FSM solution for your problem, that you can do it yourself, explanations are poor and demands knowledge, not intelligence.
It is obvious that if one knew the system of using variables it would be easy to find which one you need and combine with other ones etc. (not needed much intelligence for figuring out do I need bool or string or integer etc.). Pointing me on Playmaker manual is useless, because there you will find the same way of explaining things / not clear, not with examples that includes objects.
At the end there could be nothing in the editor that is not an object of some kind, but when somebody is explaining variables usage it is always an abstract self-oriented explanation which confuses, living you to nowhere when you try to implement that on a particular object(s).


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Compare Vector 2 please HELP
« Reply #1 on: December 09, 2019, 09:17:57 AM »
Hi,

 yes, this kind of concepts rarely become intuitive at first,  regardless how much you read on it or how it's explained, this comes with time and practice, looking at existing fsm, and at one point, it will become clear.

also, you are likely trying something too hard at first, do something simple, and expand in complexity after. A Puzzle solving algorithm is not a trivial task, even in pur c#


Check out the sample "Three in a row" on the ecosystem, it's a good start to get into complex checking routines.

https://twitter.com/JeanAtPlayMaker/status/800634493904257026



in your case, specifically, see how the three in a row logic chain checks from one square to the other. Study this, and come back if you have more questions ( ping me as well if you don't get any replies)

Bye,

 Jean