Attribute Manipulation Depending On Position
robert.mccarthy
Member Posts: 165
Hi All,
I'm having a problem with attribute manipulation depending on position (X or Y).
Basically, I want to do the following:
When an actor's position changes in the 'X' position 1 pixel, then I want it to move 3.8 pixels in the 'Y' position.
So if it moves along 'X' for 10 pixels then it will also move along 'Y' in 38 pixels. Then if it moved back along 'X' in the negative for 1 pixel the 'y' position would only move 34.2
I hope I have not made this confusing, and as easy as possible.
Cheers,
I'm having a problem with attribute manipulation depending on position (X or Y).
Basically, I want to do the following:
When an actor's position changes in the 'X' position 1 pixel, then I want it to move 3.8 pixels in the 'Y' position.
So if it moves along 'X' for 10 pixels then it will also move along 'Y' in 38 pixels. Then if it moved back along 'X' in the negative for 1 pixel the 'y' position would only move 34.2
I hope I have not made this confusing, and as easy as possible.
Cheers,
Comments
Have them change as the character's position changes. So if the character moves 10 to the right, then do a Change Attribute self.Starting X to 10, and, "self.Starting Y to self.Starting X * 3.8" Then do a constrain attribute on the character: "position.X to self.Starting X" and "position.Y to self.Starting Y"
I'm not 100% certain on the logic there (I'm still fairly new to GS and programming for that matter), but it might give you some direction on where to start...
Hope that's helpful.