Need help with layers
f4ri4
Member Posts: 1
I'm creating a game in which there are two tab sliders at the bottom of the screen. The tabs are individual. I want to group these two sliders together so that when I slide, both of them move together, instead of each one at a time. There has to be a space in the middle to allow an object through, so I cant place an "touch-area" rectangle over both tabs. Please help? Thanks!
Comments
Hello @f4ri4 do you know r2d2? (Sorry, couldn't resist that! )
There's no grouping feature in GSC in either edit mode or at runtime. The solution to your problem is by using the behaviour called Constrain Attribute.
So in the 2nd tab, you'd put in its Rules:
Constrain attribute self.Position.X to scene.Background.YourFirstTab.Position.X + ??
The ?? is the amount of pixels you want your 2nd tab to be offset from the first tab.
You obtain this number by finding the distance you want in pixels between the tabs (i.e the distance from the centre of the first tab to the centre of the second tab including the gap you want between them... easier to do than explain....)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps