Animated slider

blendnzjnrblendnzjnr Member Posts: 11
edited December 2011 in Working with GS (Mac)
Hi - this is my first post in the forum - it's good to have a suport system... I hope it works!

I am creating an iPod/Phone game involving dice,
where I will have a slider in the settings, which is a dice that can be dragged left and right (ie like a normal slider) which is animated to rotate, and the number on the dice indicates the setting (ie number of players).
I think it is a cool idea and I know it can work, but I have some issues I would love some help with.

If you want to see the dice images (256 x 256 - I'm wondering whether I need them that big?):
http://tutorials.blendnz.com/Media/Renders/Dice/0001.png
(Change the last number to see other frames in the animation)

Currently I have a rule on the dice actor that changes it's self.position.X attribute to the mouse Position,
as well as a constrain attribute which constrains self.Motion.Linear.X to 10*(game.Mouse.Position.X - self.Position.X)
This seems to give smooth dragging...

now the questions are:
1. How do I most easily animate the dice to change image at certain X positions?
(So that while you drag it right it animates the rotation in that direction, and when you drag it left it 'back-animates', rolling back with the movement)
2. How can I restrict the X position so that it can't be dragged past a certain point to the left or past a point to the right?
(ie so it stays on the slider)
3. AND following on from 2 is it possible to restrict the position of an actor to only certain X values? So that when you drag it kind of snaps to the next incriment?

Thanks everyone! look forward to a response!

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Open GameSalad, in the 'New' tab, under 'filter', search for 'Animation Controller DEMO', a lovely little demo from Firemaple Games that may help and give you some ideas. You can probably tweak that to your needs.

    If when you 1st type in the name, if it doesn't show you just need to leave it a little bit until the blue bar gets to the end, it will show eventually.
Sign In or Register to comment.