|
| 09 Jan 2010 10:07 AM |
| title. I think I spelt UDim2 wrong, but nevermind. |
|
|
| Report Abuse |
|
|
bobob55
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 4522 |
|
| |
|
|
| 09 Jan 2010 10:12 AM |
| .. You dont even know what it is? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:12 AM |
UDim and UDim2 are both tables...
Vector3? There is no conversion for that... -_- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:13 AM |
| Its a type of Vector2. Its for GUIs positions, sizes and stuff like that. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:13 AM |
@king:
It is NOT a Vector2... Don't put the two together. |
|
|
| Report Abuse |
|
|
bobob55
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 4522 |
|
|
| 09 Jan 2010 10:14 AM |
Oh ok, so it has to do with GUIs?
|
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
|
| 09 Jan 2010 10:17 AM |
| Two Dementional Objects. remove the z or x factor? Lol? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:18 AM |
The size and position and all that. It looks like this: (Position property of GUI)
Position | {.4, .3} {0, 0}
The first one is scale (i think) which compares it to the size of the screen, 1 being the whole screen. The second table is the offset. Thats where you can manually change the size to EXACTLY how you want (measured in pixels, i belive). Usually, if one table has something other than 0s, the other table has both 0s. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:19 AM |
@King:
Offset can't have fractional values. You gave the X Offset a fractional value... |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:20 AM |
| i thought that was scale, the first table... |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:20 AM |
| And Scale isn't always based on SCREEN SIZE. It is always based in it's carrier's AbsoluteSize/Position... |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:20 AM |
But I mean, if I were to try, which I am, to make a game, where you can right click on stuff to make menu's pop up like fight and all that, how would I say
script.Parent.whateverGUI'sPositioniscalled = script.Parent.Parent.Parent.Mouse.Target
how could I do that? It would obviously be in a tool, but its just an example of what I want it to do |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:21 AM |
@king:
They aren't tables... That is the way the __tostring metamethod shows it. They are USERDATA, just like Vector3 and Vector2 and UDim (which is what X and Y are) and Faces. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:22 AM |
I only use the values marked -
{-.0}, {-,0}
I find them easy enough to use, except the decimal part where they never go to what decimal you want is annoying, instead of 0.5 it goes to 0.49999999999999 etc. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:23 AM |
@trapping:
Not a big deal, seeing as it can only go to 12 decimal places. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:26 AM |
yeah but its a lot more neat when it stays where you ask it to.
anyway, how can I say
script.Parent.MouseButton1Down:connect(function(clicked) if clicked.Name == "Zombie" then game.Players[script.Parent.Parent.Name].PlayerGUI.ScreenGui.ZombieMenu.Visible = true game.Players[script.Parent.Parent.Name].PlayerGUI.ScreenGui.ZombieMenu.Position = UDIM2.new{how do I set it to be wherever he clicked?, 0}, {0,0} end end)
|
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jan 2010 10:28 AM |
| The event 'MouseButton1Down' returns X and Y. What the heck is 'clicked'? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:33 AM |
the argument. I thought it was what you clicked on
*returns to fail hole nd sits down in the fail corner* |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 09 Jan 2010 10:40 AM |
@Blocco
i have converted Vector3 to Udim2... The problem is it only works depending on the size of the baseplate. If i can remember the forumla...
It was something like.
Frame.Size = UDim2.new{0, game.Workspace.Baseplate.Size/2, 0, game.Workspace.Baseplate.Size/2}
I am not 100% sure... Maybe i can find it somewhere.... |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 10:47 AM |
game.Workspace.Base.Size = (512,0.4,512) -- in most cases game.Workspace.Base.Size/2 = (256,0.2,256) --??? |
|
|
| Report Abuse |
|
|
XlegoX
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 14955 |
|
|
| 09 Jan 2010 10:52 AM |
| There is no way to convert from a Vector3 to a UDim2, as there is no logical conversion between them. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 09 Jan 2010 10:53 AM |
Nah. I told you i can not remember the forumla.
If the baseplate size is equal to 500, then it divides it by 2. If its like 750 then it divides it by 3. This is because the frame size always has to be 250. So the bigger the baseplate the more it divides. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2010 11:15 AM |
| is hewre any way of placing a GUI wherever you clicked, like a right click menu |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 12:07 PM |
howdy there
Mmph mmmph mph-mph mmph mmmmph! |
|
|
| Report Abuse |
|
|