werts15Join Date: 2008-09-27 Post Count: 1031 |
Is it possible to change the shape of a GUI? So it's not just a block. I want one in the shape of a puzzle piece, but I have no idea how to do it? I am NOT asking for the script, I just need help getting it started. Any help? |
|
wazup07Join Date: 2009-10-17 Post Count: 313 |
i dont think you can do this. I know one way you could do it is to create an image of a puzzle piece, upload it to roblox, then use an imagelabel with your uploaded picture on it. Hope this helps. |
|
|
wazup07Join Date: 2009-10-17 Post Count: 313 |
hmm yeah i guess you could do that too lol i think an image would look better though |
|
|
i could make you a decal (use for ImageLabel)
just tell me if u want me to make one...
and tell what color and if haz border(border is line)
:3 |
|
PlayrobotJoin Date: 2007-12-22 Post Count: 1626 |
Just put a frame of a certain size and make it transparent and then put an ImageButton on top of the frame that has the image of the puzzle piece. with a transparent background on the edges where the puzzle piece isn't. I do that all the time with round buttons. |
|
pkmasiveJoin Date: 2009-11-27 Post Count: 149 |
yes you can be you need alot of scripting skill to be able to change the shape vareables i sugest you stay to normal squar/rectangle gui's |
|
pkmasiveJoin Date: 2009-11-27 Post Count: 149 |
i never new you could do it like that playrobot. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
I do not understand where to put the stuff. I have this:
--StarterGui
----ScreenGui
------TextButton
--------Script
Any help on where to put the stuff? |
|
EverstoneJoin Date: 2009-08-10 Post Count: 2989 |
Insert a ImageLabel. It might help. >.< |
|
|
Should be
--StarterGui
----ScreenGui
------Frame --Transparency is transparent, and successful fail is paradox.
--------ImageLabel --Containing whatever shape you want your piece to have
----------Script --Whatever this is. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
I have what is above, and I want it so it is possible to drag the puzzle piece. I got the script out of free models, and it worked, until I messed with the Image and Frame.
bar = script.Parent
vals = {}
c = bar.Parent:GetChildren()
for i = 1,#c do
tab = {
xs = c[i].Position.X.Scale,
xo = c[i].Position.X.Offset,
ys = c[i].Position.Y.Scale,
yo = c[i].Position.X.Offset}
vals[c[i].Name] = tab
end
held = false
function startDrag(xpos, ypos)
for i = 1,#c do
xoish = xpos - c[i].Position.X.Offset
yoish = ypos - c[i].Position.Y.Offset
vals[c[i].Name].xo = xoish
vals[c[i].Name].yo = yoish
end
held = true
end
function move(xpos, ypos)
if held then
for i = 1,#c do
c[i].Position = UDim2.new(vals[c[i].Name].xs, xpos-vals[c[i].Name].xo, vals[c[i].Name].ys, ypos-vals[c[i].Name].yo)
end
end
end
function stopDrag()
held = false
end
bar.MouseButton1Down:connect(startDrag)
bar.MouseButton1Up:connect(stopDrag)
bar.MouseMoved:connect(move) |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
BuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUmP. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
Nobody helps with the hard stuff... I guess I will have to do "BuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUuUmP" again. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
I think I need a button someplace. Any help? |
|
|
|
ScreenGui
-Frame
--ImageButton (Puzzlepieces)
---Script (Drag script)
its Imagebutton (not imagelabel<- is like a picture frame) because You use it for Drag
|
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
Thanks, RobloxmasterDX!
It works now, but when I make the Frame Invisible, it makes the imagebutton invisible too, because it is in the Frame. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
I got it to work. I got rid of the frame, and made the imagebutton's background transparent. But now, When I put my mouse over it, it turns yellow, and when I click it, it turns blue. I think it has something to do with the script, but I do not know what most of the script means. Help please? |
|
EverstoneJoin Date: 2009-08-10 Post Count: 2989 |
It isn't the script. It's just the function of an ImageButton. If you don't want to do that use an ImageLabel instead. But then it can't be dragged. :/ |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
So I can't get my game to work? :'( I was hoping to make a good gui scripted game and have it get on the front page. There was going to be different levels of jigsaw puzzles and each one gets harder and harder. :'( But I guess that is not possible. |
|
SpikexpJoin Date: 2008-08-05 Post Count: 513 |
There should be a button that says something along the lines of "Auto Color Select"
Make sure it's false. |
|
SpikexpJoin Date: 2008-08-05 Post Count: 513 |
Actually, it says "AutoButtonColor". Second option down. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
Thanks, spike! Now it works! I will make new questions in a different thread if I have any. |
|
werts15Join Date: 2008-09-27 Post Count: 1031 |
Nevermind. It still does the same thing. But, if I make it inactive, it does not do that, but it is lighter and you can see the outline. Weird... |
|