Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:14 PM |
Hey. So, I was wondering if there was a way to make a BillboardGui ONLY appear if it is within a certain area of the screen. So if it is in the center of the screen (.25 away from edges) it will appear. I tried placing a BillboardGui inside my playergui, inside a frame with ClipsDecendants on, but that failed. Any ideas :S ? |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:16 PM |
| Or, is there a way to tell the position of a BillboardGui on a player's screen? |
|
|
| Report Abuse |
|
|
| |
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:22 PM |
| AKA, you don't know how, judging by your free modelled places. Some kids, lol. |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2012 10:23 PM |
I don't think so. If there is, I have never heard of it, or encountered it. I have read the article on the wiki, never come across anything like that:
http://wiki.roblox.com/index.php/RBX.lua.BillboardGui_(Object)
~LUV, LuaLearners Teacher(+2)~ |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:25 PM |
| I've heard of and encountered it. I suggest you ask Litozinnamon. |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:31 PM |
| The AbsolutePosition property would do the trick for me, if only it would work. Any ideas? It's stuck at 0,0. I tried using a localscript to access it and it is still 0,0. This would solve my problem. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:32 PM |
| I guess it's locked, I also tried accessing it and It never worked out. |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2012 10:33 PM |
I don't think so.
~SamuelKingx~LuaLearners Teacher(+2) |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2012 10:35 PM |
In theory this should work:
Find the distance between the character and the part that the Billboard is attached to, and if it's greater than a certain number then change the visibility to false.
-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::] |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:37 PM |
| It won't create the desired effect. I just want a GUI inside my player to mimic the billboard GUI's position. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:37 PM |
| Swim, there are others in the game though.. I think he'd have to use a local script change the cameras view of it. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:38 PM |
| I so sorry, I didn't read the thread post correctly. |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:40 PM |
| Well I'm making a HUD for a jet. If they are looking at another jet through the HUD, it should have a GUI around the jet, only in the HUD. I can work without it, but this would be much nicer, especially for missile locking. |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:45 PM |
| My friend used to have these free models that were "GUI Signs" before BillboardGuis were released. Those WOULD work, if I extracted the positioning code. Any ideas there? |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2012 10:46 PM |
What do you mean you can't access AbseloutePosition? Wouldn't you just use UDim2.new()?
~LUV, LuaLearners Teacher(+2)~ |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:47 PM |
| Well, if I knew exactly what I was working with, I would understand better. |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:49 PM |
Here's the new question, to save some explanation. A GUI that SIMULATES a billboard GUI. So it will update it's position on the screen, based on the part. Size isn't needed, just positioning. There was code for this. |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 25 Dec 2012 10:53 PM |
| With the AbsolutePosition make sure that you are waiting the 1.3 seconds needed for the GUI to work. Also make sure you are using a LocalScript. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:54 PM |
| OHHHHHHH!H!H!H!HH!H!H! I see. So basically it would make it look like there was a gui ontop of the persons head. Maybe the player used a mouse.target or mouse.hit. There are many possibilities to what they could have done. Basing from what I see you were explaining before you want a lockon, so once the mouse touches the head, it says that hit into a table maybe, then after it does that it will keep the gui their, and the rocket or whatever would fire that the position that is being updated. I know my explanation might be pretty hard to understand but I do understand. |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 10:55 PM |
Eh..no. Just work with this: A GUI that follows a part using a localscript to do this. Just updates its position, not the size. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 25 Dec 2012 10:58 PM |
Maybe it used magnitude to check how many studs away, then used to math to put the gui in the position of the part.
Just if there was a tovector3 event :p |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
| |
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 25 Dec 2012 11:02 PM |
You'd need it to be camera distance don't forget. cam = game.Workspace.CurrentCamera local distance = (cam.CoordinateFrame.p - target.Position).magnitude
That'd be size. But we don't need that, we want position. |
|
|
| Report Abuse |
|
|