PHP Code:
function onCreated()
{
temp.var = this.ani.getSprite(20);
if ( temp.var == 20 )
echo( temp.var SPC "is an object of type" SPC temp.var.objecttype() );
}
returns
PHP Code:
20 is an object of type TGraalVar
To simplify... Because the obj.name is the sprite name (20), it conflicts with the object type (20) named 20. Instead of returning an TGraalAniSprite, it returns TGraalVar.
This DOES work, however:
PHP Code:
this.ani.getsprite( 20 ).objecttype();
meaning as long as you don't save the object as a variable, you could use it without conflict.