Hey man, I went ahead and through together a little process for you to follow. If you want I can put up a game for you to download with this in it. What you want to do is first create your actors that will be in the level queue. then create a behavior and name it whatever, I named it slider. then in the (created) tab input the folowing
--
see step 1.PNG
create variables: can record mouse?/boolean | start x/number
--
now lets go into the Always loop.
Go ahead and copy everything into your behavior
--
see step 2.PNG
create variables: initial mouse X/number | current X/number | Pannel X/number/global |
the rest have already been created.
--
now attach this behavior to your FIRST level selector.
What this creates is a level selector that will move with your mouse and stay where it is when you release. However, this isnt any fun, because it doesn't shoot back to the center of the screen. so lets add some cool sliding stuff.
--
see step 3.PNG
in this, nothing much is new, however, I did add 1 new script into the (mouse up) section. And I moved the (set X to pannel X ......).
--
Now you have 1 actor that moves with your mouse, and slings back to its origin after you release it. But you need a lot more than just one level selector, so go ahead and create a new script for the second actor. I named it slider 2 (how original). and go ahead and copy this stuff into the behavior. Oh, yah, and go ahead and attach this behavior to your second menu pannel.
--
See step 4.PNG
create variables: start X/number
--
now moving into the Forever loop
--
See step 5.PNG
scene width is located under scene -- tab -- world
--
Now this adds in that second menu actor. Of course, you can play around with that number that goes where the (Scene width) is. using scene width just puts the actor just out of the screen at the start. but if you change the number where the (scene width) is, you will have to change the number where (scene width) is in the next step. so yah, moving to the last step. At this point the actors move and everything, however, when you release the mouse, it shoots back to the first actor. So go back to the initial first actor behavior and add in what I have added in. what this does is make so the closest actor to the middle of the screen snaps to the middle.
--
see step 6.PNG
Like I mentioned, If you changed the number where the (scene width) goes in step 5, you will have to change the number in the following script to match. (see script.PNG)
--
Hope this helps you out bro. If you have any questions just ask.