Randomly rotate a non-moving actor
![Fang](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hey all
I'm having a bit of trouble again (and I bet the solution is really simple again, but I can't seem to figure anything out).
I have an actor that I want to rotate counterclockwise at a speed that changes to a random(200,400) every second. I also want other actors to be able to collide with it.
For the rotation, it needs to be movable. But if it's movable, and another actor collides with it, it slides away.
How do I make it so that it can rotate, but doesn't move on collide?
Thanks,
~ Fang
I'm having a bit of trouble again (and I bet the solution is really simple again, but I can't seem to figure anything out).
I have an actor that I want to rotate counterclockwise at a speed that changes to a random(200,400) every second. I also want other actors to be able to collide with it.
For the rotation, it needs to be movable. But if it's movable, and another actor collides with it, it slides away.
How do I make it so that it can rotate, but doesn't move on collide?
Thanks,
~ Fang
Comments
A workaround is the following (which I haven't tested yet though, but can't see why it shouldn't work): two integer attributes, one has the x value of the actor, the other the y value, called Actor1 x and Actor 1 y. A third and fourth real attributes, lets call them A1 ConX and A1 ConY; in Rules, Two constrain behaviours to the rotating actor. and Rules: when A1 ConX does not equal Actor1 x, change attribute Actor1.position.X to Actor1 X. Same for Y.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
create an additional actor ...actorX (invisible or behind the scenes)
actorX rotates as you want
constrail actorX.Rotation to game.actorXRotation
and constrail game.actorXRotation to self.Rotation fixed actor
Your method seems easiest, thanks a bunch.
But is there really no simpler solution? Find it kind of odd that disabling actor movement also disables rotation, seeing as how rotating doesn't change its location...
always happy to help