Game Development Community

t2dStaticSprite() size problem

by robyone13 · in Torque Game Builder · 02/08/2010 (1:05 pm) · 2 replies

Hi, I have a problem. I can load a static sprite giving

%img = new t2dStaticSprite() {
....
size = "39.0625 39.0625";
};

but if i do:

%sizeX = 39.0625;
%sizeY = 39.0625;
%img = new t2dStaticSprite(){
..
size= "%sizeX %sizeY";
}

Nothing is showed. I'm missing something!
By the way, the same thing works with "position":
position= "10.9 10.9" and position= "posX posY" BOTH works.

Thanks

#1
02/08/2010 (2:04 pm)
size= "%sizeX %sizeY";

should be

size= %sizeX SPC %sizeY;

or

size= "%sizeX" @ " " @ "%sizeY";
#2
02/09/2010 (7:35 am)
It worked!! Thank you!!