set location of group doesn't set it to the point I specify
Posted: Mon Sep 14, 2015 7:03 pm
I've been working on refactoring someone else's stacks, using groups for graphics that are repeated on multiple cards to reduce the size a bit.
The problem I'm running into is when a group of images is in a different position on one card than the other. Since changing anything in a group changes it everywhere, I now have to make sure locations are set explicitly in the code on each "on openCard".
Unfortunately, when I use "set the location of group X to X,Y" it sets the location of the group to some wrong, and seemingly arbitrary location.
For instance, I say " set the location of group "BodyParts1" to 171,386" and when I run it, the group is in the wrong place, and checking the properties of the group, I see the location is 149,630. If I say "put the location of group "BodyParts1" into tGroupLoc, then checking the variable shows me... 149,630.
I've even tried using move instead of set location to see if that would work better. Same thing, I tell it to go to a point, it goes to a totally different point. I thought I had it for a bit, as it was moving it to a point that was only +4,+4 off from what I told it. Okay, I can adjust for that. But, then I had to go to the first card of the project and set locations there since I had moved it at the end of the stack. And once I got those set, returning to the last card of the stack the move command now chose a completely different point to wrongly move it to.
What am I missing here? It is almost like I am setting it relative to some unknown point, but I'm not. I'm specifically declaring what point to set the location to, and it's just not listening. Does setting the location of a group work entirely different than setting the location of another object? If so, it would be nice to see this in the documentation of loc, location, and move.
Any help would be greatly appreciated.
The problem I'm running into is when a group of images is in a different position on one card than the other. Since changing anything in a group changes it everywhere, I now have to make sure locations are set explicitly in the code on each "on openCard".
Unfortunately, when I use "set the location of group X to X,Y" it sets the location of the group to some wrong, and seemingly arbitrary location.
For instance, I say " set the location of group "BodyParts1" to 171,386" and when I run it, the group is in the wrong place, and checking the properties of the group, I see the location is 149,630. If I say "put the location of group "BodyParts1" into tGroupLoc, then checking the variable shows me... 149,630.
I've even tried using move instead of set location to see if that would work better. Same thing, I tell it to go to a point, it goes to a totally different point. I thought I had it for a bit, as it was moving it to a point that was only +4,+4 off from what I told it. Okay, I can adjust for that. But, then I had to go to the first card of the project and set locations there since I had moved it at the end of the stack. And once I got those set, returning to the last card of the stack the move command now chose a completely different point to wrongly move it to.
What am I missing here? It is almost like I am setting it relative to some unknown point, but I'm not. I'm specifically declaring what point to set the location to, and it's just not listening. Does setting the location of a group work entirely different than setting the location of another object? If so, it would be nice to see this in the documentation of loc, location, and move.
Any help would be greatly appreciated.