Game Development Community

A simple question.

by University of Pisa (#0006) · in Torque Game Engine · 06/15/2006 (9:26 am) · 1 replies

I would like to assign a variable to position value.
for example:

for(%i=0; %i<10; %i++){
new GuiCheckBoxCtrl(a){
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "300 20";
MinExtent = "20 20";
Visible = "1";
bitmap = "./Magic/MShield.png";
wrap = "0";
};
a.position="0 %i";
}

Thanks in advance.

#1
06/15/2006 (5:00 pm)
Use :

for(%i=0; %i<10; %i++){
   new GuiCheckBoxCtrl(a){
   ...
   position = "0" SPC %i * 20; // considering that the height of the box is 20
   ... 
   };
}