|
| 22 Jan 2013 11:33 PM |
for i, v in pairs(game.Lighting:GetChildren()) if v:IsA("Model") then if game.Workspace.CurrentCamera.v.Owned.Value == 1 then v = nil
Now, is there a certain way to include a variable into a path finding? Because I know
game.Workspace.CurrentCamera.v.Owned.Value
Won't work. It'll just see if there's something named v in CurrentCamera. Can somebody help me? |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2013 11:33 PM |
| i dont think there is anything in CurrentCamera with the name v |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
|
| 22 Jan 2013 11:36 PM |
Are you trying to pathfind, and adding objects that the path will pass through? Or trying to make objects local. |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2013 11:37 PM |
Er... that's not the question I asked. I was wondering if you could make v equal the variable.
v = Anything that's a model in lighting.
I was wondering if I could somehow implement that into
game.Workspace.CurrentCamera.v |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2013 11:38 PM |
game.Workspace.CurrentCamera.v.Owned.Value
I want to know if it's possible to make that, not v, but the variable that v equals. |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
| |
|
|
| 22 Jan 2013 11:41 PM |
Hmm... I'm not sure if you're right or not getting it. Let me explain thoroughly, one more time.
game.Workspace.CurrentCamera."v"
Now it's going to search for the name "v" in CurrentCamera. Instead is there a way I could actually make it's variable? So it searches for... example: "DarkKnight" game.Workspace.CurrentCamera.v(=DarkKnight) |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
|
| 22 Jan 2013 11:43 PM |
| Well, you could try naming V the subject, and having the code search for the object type of v. |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2013 11:45 PM |
| I'd like if you could explain more, or lead me somewhere to read about ObjectValues. I'm new with scripting. I've never used an Object Value before. Is there a wiki page for it, possibly? |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
|
| 22 Jan 2013 11:50 PM |
An object value is a value that holds a link to a model in the game. When you enter the .Value of the object, you are going to the model it links to. |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2013 11:54 PM |
So how would I write that? It wouldn't be game.Workspace.CurrentCamera.ObjectValue.Value. Hm, wait. If I stuck the ObjectValue into CurrentCamera I could do that, and I think that would make it work. Wouldn't it? |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
|
| 22 Jan 2013 11:56 PM |
game.Workspace.CurrentCamera.ObjectValue.Value = v
then objectvalue.value IS v.
You tell me bro. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Jan 2013 12:17 AM |
| Well it seems to be working, but... not exactly. |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
| |
|
|
| 23 Jan 2013 12:21 AM |
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
THE PROBLEM IS SETTING THE OBJECTVALUE TO v IS ALMOST MAKING IT GO TO game.Lighting.NameHere.
I THOUGHT game.Workspace.CurrentCamera.SeeIfOwned.Value.Owned.Value WOULD WORK |
|
|
| Report Abuse |
|
|
|
| 23 Jan 2013 12:22 AM |
IS MAKING IT GO TO game.Lighting.NameHere.*
NOT ALMOST
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
|
|
| Report Abuse |
|
|
1WOOF1
|
  |
| Joined: 03 May 2009 |
| Total Posts: 20682 |
|
| |
|
|
| 23 Jan 2013 09:22 AM |
| Thank you, I was wondering if v.Name would work in this situation. |
|
|
| Report Abuse |
|
|