I've encountered a problem (no duh, AR , get on with it ). A puzzle in my age involves rotating several disks with patterns drawn on them. When the disks are rotated into the right combination, the patterns will line up and... currently undecided things happen. The disks are rotated by pushing a button (or some similar mechanism. but that's not my problem). Anyhow, as we probably all know, it's not too hard to come up with ideas, but putting them into practice is another thing entirely. I don't think it's possible to rotate an object bit-by-bit with one clickable easily using AlcScript (like, push the button, object a rotates 40 degrees. push it again, it rotates another 40 degrees etc.), but I'm sure it can be done with some clever python coding- which is where you guys come in. I managed to work out that there should probably be some variable for the rotation of the objects, which is added onto every time the button is pushed, and actions occur when a group of variables have certain values. An example (if you'll excuse the pseudo.functions):
- Code: Select all
rotobj2 = 0
if button.pushed:
rotobj2 = rotobj2 + 1
if rotobj2 = 9:
rotobj2 = 0
rotobj1 = 0
if button.pushed:
rotobj1 = rotobj1 + 1
elif rotobj1 is 4 and rotobj2 is 2:
puzzle.solved
elif rotobj1 is 9:
rotobj1 = 0
So, my question really boils down to this: how do I code animations and events for Uru using python, and would there be a way to do what I want in AlcScript without resorting to convoluted methods like making multiple button objects, each tied to a specific animation, that appear and disappear every time the button is pushed.
I've had a go at using the search function, but I couldn't be bothered to look through all of the pages once I managed to find a group of keywords that didn't cause an error.
Thanks,
AR