Is it possible in c-script to pass an object name in an argument so you can dynamically reference an object in a function?
example: Let's say I have 2 panels "message_panel" and "warning_panel". And I want to create a function called showPanel() to display...fadeup...whatever a specific panel. Either the message_panel OR the warning_panel in our example.
I'd love to pass the panel name as an argument, let's say showPanel("message_panel");
...and then have the function change the alpha of the panel to fade it up or down. Sort of like:
function showPanel(whichPanel) {
whichPanel.alpha = 50;
}
Of course, this tanks in c-script

. Hopefully there's a way to do this...without a bunch of if/then statements inside the showPanel function to account for every possible panel.
Thanks,
Todd