Hi,
why not? you have all the actions to do this, you just build an fsm with several states that represent this algorythm.
I did, but i feel like it's messy, probably because i'm not good enough yet haha
To check if multiple rings are there i've a lot of int switches to fill, i'll try again today to find a better way to do it.
however, could you not do that with triggers? you could have your rings with carefully places box colliders and you check their collision which will help deciding what can be moved or not .
for example if each ring as a box tangent to their outer circle on one axis, you can then check if it collides or not with the ring above or below and deduce what can be done with it.
basically, what I am trying to say is you could traverse the rings on the pillar from bottom to top in a loop and check the current one against the one below and stop where it's wrong, this will be easier than trying to have an overview of the game with one number ( provided you are limited with scripting or algorythm experience)
Bye,
Jean
But how do i know if the ring can move to another pillar ? I've to check the rings on the "destination" pillar to the actual pillar the ring in on to allow the ring to move. By the way, the overview of the game is done with 3 numbers, a count of rings on each pillar.
At the moment i use triggers on rings and on pillars. I use int add every time a ring enter a pillar to know which rings are there when i'm moving a new one.
But when there are like 6 rings on the same pillar it's becoming kind of a headache to know what can move.
So i think Plancksize's method is also good when a ring arrive (setting the int value to the ring on top), but when one ring leaves i subtract the int value of the ring and if there are other rings remaining on the pillar, i don't know which one is still there because the int value is 0. So at the moment i don't know if i can only refer to the ring on top.
Anyway, i need some time to think about all of that.
But i'll definitely try both of your methods, thanks guys