Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 21 Mar 2012 04:57 PM |
Alright, I want to make a script much more simple than I can figure it out. What I want is this: When you click one of five buttons (let's call this set A), it changes the text of all 10 other buttons (in set B). In turn, when you click any one of those buttons (set B), it will change the text of a few textlabels, and one button (let's call this set c)
Set B changes depending on Set A, and Set C changes depending on set B, which depends on set A.
Is there a way to do this without having hundreds of lines of code for each possible outcome? (50 outcomes) |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
|
| 22 Mar 2012 03:09 PM |
Maybe try add a String Value in each with the desired text and put these lines in And also add IntValues with 1 for Set A , 2 for Set B,etc
local p = script.Parent:GetChildren() --edit this line for i = 1,#p do if p[i].ClassName =="TextBox" then --edit this line wait(1) -- Hehe if p[i].IntValue.Value == 1 then p[i].Text = p[i].StringValue.Value end end end
--Just copy this script and paste into Set B buttons and edit. |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 22 Mar 2012 03:13 PM |
| Hmm...I think it would just be easier to use a few tables... |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 23 Mar 2012 03:04 PM |
| seriously...nobody has a better soloution? |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 23 Mar 2012 05:56 PM |
| Why not use a loop, put it in each set, and the loop would check if Set A.Text == 1. If it does then Set B will equal 2. And set C will check if Set B equals 2 and then SetC.Text wil equal 3. Then SetA does the same and checks to see if SetC equals 3 and then it will equal 1. |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 23 Mar 2012 06:31 PM |
| still requires hundred of lines of code that is pretty much the same |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 23 Mar 2012 06:36 PM |
| I made one like this. All you need to do is use IntValue's. |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2012 11:23 AM |
| Use frames....Put Set A on one frame, B on another....Whenever you click a button change positions of frames. |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2012 11:26 AM |
Variables?
x = script.Parent.Parent n = Text
function clicketi()
x.A.n = "Texthere" x.B.n = "Texthere" x.C.n = "Texthere" x.D.n = "Texthere" x.E.n = "Texthere"
script.Parent.MouseButton1Down:connect(clicketi) |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 25 Mar 2012 07:04 AM |
| I think he is trying to make a GUI like litozinnamon. (Weapon menu gui) |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2012 08:07 AM |
| can you post all the combinations and I'll see what I can do. |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 25 Mar 2012 10:48 AM |
| Yeah, I am trying to make a weapon gui. Even using variables, I have 50 different guns. I really don't want to write around 8 specs times 50 guns, all on a separate line. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|