|
| 07 Aug 2011 02:36 PM |
hi guys how would i go about making an onscreen gui that tracks an object...
e.g. if a players pops onto veiw of my camera a gui will move it its position on my screen and follow it untill he is off of my screen?
how would i go about doing this and il figure it out from there :P |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 02:38 PM |
| Well take their x and z position, put it over the x and z position of the base, do the same with the size and then you have the scale for both position and size. |
|
|
| Report Abuse |
|
|
| |
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 02:41 PM |
| because then it gives a birdseye view. I don't believe I was entirely correct on the position thingy. But look at ozzypig's gui tutorial and it explains there. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 02:41 PM |
| can you send a link please =D |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 07 Aug 2011 02:44 PM |
There is a GUI element that you can set to 'stick' to an object on screen. I remember reading it yesterday.
http://wiki.roblox.com/index.php/RBX.lua.BillboardGui_%28Object%29 |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 02:46 PM |
http://www.roblox.com/Forum/ShowPost.aspx?PostID=37319514
|
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 02:47 PM |
@rofl
billboard gui's apear in the 3D space though. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 02:58 PM |
| i dont want it to be a bilboard gui :P reason being as it needs to bediffrent colours for diffrent players :P |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:04 PM |
unfortunaly thats is just for a gui map thing, im on about making it so it follows the object on the screen...
e.g. you can make a gui follow your mouse on the screen by using a function to see weather or not the mouse has moved and if it has move the gui to the mouse CFrame... i wish to do the same but instead of it following the mouse on screen it will follow an abject of my choosing... |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 03:07 PM |
| Oh you mean like at that perilous skies place? just put the billboardgui's in the player's PlayerGui. |
|
|
| Report Abuse |
|
|
| |
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 03:10 PM |
| Just have the BillboardGui go into the player's PlayerGui and then set the adornee to the brick you want. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 07 Aug 2011 03:12 PM |
I quote myself:
"http://wiki.roblox.com/index.php/RBX.lua.BillboardGui_%28Object%29" |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:17 PM |
il say this again how does that allow me for 1 player to see cirtain people 1 colour but some one else se then a diffrent collor...
e.g. player 1 sees player 3 gui as green but player 2 sees player 3 gui as blue?!?!?!
also by having a bilboard gui it does not alolows me to add buttons wich is esential for my targeting system... |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 03:18 PM |
@carbon
once again, to make everyone see the gui's differently you just have to put them in the player's PlayerGui
also you CAN add buttons to a BillboardGui. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:20 PM |
| but how does putting a bilboard gui in a players playerGui work?!?! what would i set the adornee as?! |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Aug 2011 03:20 PM |
| The Adornee will still be the brick, the parent of the BillboardGui will be the player's PlayerGui. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:22 PM |
so how would that let me make it so on 1 person its 1 colour and on another person looking on the same player be another colour?
would i use something about the absolute position? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:36 PM |
e.g.
local c = game.Player.RandomPlayer.PlayerGui.BillboardGui.AbsolutePosition --i dont know how to change vector2 into a X and a Y chord but im sure it can be done =D anyone know how? script.Parent.Frame.Position = UDim2.new(0,x,0,y) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 08 Aug 2011 03:08 PM |
| I don't get what you're trying to do with that? |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
| |
|