I am trying to change the alpha of a tool on a staff tool bar I made for a UC server, so I used a for loop to do so. Originally, doing this would work:
PHP Code:
DoctorStaffBar_Control0.alpha = 0.3;
DoctorStaffBar_Control1.alpha = 0.3;
DoctorStaffBar_Control2.alpha = 1;
DoctorStaffBar_Control3.alpha = 0.3;
etc.
Although my code got really long. So, I made a for loop and added a continue so that if the code got to the staff tool selected, the alpha would become 1. What's odd is that I echoed the code after I set the alpha, and it prints correctly. It doesn't show up on my GUI though. Yes, setting the text does work with this loop.
PHP Code:
function selectToolName(temp.staffCode) {
temp.code = 0;
for (temp.blah : getTools()) {
if (temp.code == temp.staffCode) {
temp.thing = "DoctorStaffBar_Control" @ temp.staffCode;
DoctorStaffBar_Control_Text.text = getTools()[temp.staffCode][0];
temp.thing.alpha = 1;
temp.code++;
continue;
}
temp.thing = "DoctorStaffBar_Control" @ temp.code;
temp.thing.alpha = 0.3;
temp.code++;
}
}