Game Development Community

Creating an array of controls

by Colossai Studios · in Torque Game Engine · 03/14/2005 (2:20 am) · 3 replies

I'm trying to create an array of controls, but I'm not getting the syntax right. To create one control i use this code:

new GUIBitmapButtonCtrl(bnUnit)
{
property = value;
}

To create an indexed control I've tried this, but it won't compile:

new GUIBitmapButtonCtrl(bnUnit[0])
{
property = value;
}

Anyone know how to do this?

thanks

#1
03/14/2005 (6:44 am)
Never mind, I figured it out.

$unitArray[%index] = new GUIBitmapButtonCtrl(bnUnit)
#2
03/15/2005 (12:31 am)
You might want to use a SimSet instead.
#3
03/15/2005 (7:59 am)
What's the advantage of using a SimSet?