Game Development Community

Problem with t2dAnimatedSprite

by game4Rest · in Torque Game Builder · 03/14/2006 (12:14 am) · 2 replies

Hi all,

Yesterday, a problem that had never happened before suddenly stopped me. And still I can't
find a clue.

To make my player appear, I declared like below.

$player = new t2dAnimatedSprite()
{
SceneGraph = SkarosSceneGraph;
};

When I tried to call "$player.setGroup(0)", "$player.setPosition("0 0")", console log
gave me error messages as below.

checkersdemo/gameScripts/client/player.cs (21): Unknown command setGroup.
Object (1915) t2dAnimatedSprite -> t2dSceneObject -> SimObject
checkersdemo/gameScripts/client/player.cs (23): Unknown command setPostion.
Object (1915) t2dAnimatedSprite -> t2dSceneObject -> SimObject

setGroup() is a memeber of t2dSceneObjectGroup, isn't it? So, I guess there was something wrong
when adding $player to t2dSceneObjetGroup. But I'm afraid I don't know how this adding can be
done and why it can't be done at this time.

So, would someone let me know if anything wrong with my code? Also, would someone let me know
what I have to check out before creating animatedSprite?

Thanks in advance.

Hong Jin

#1
03/14/2006 (12:23 am)
If you're using the current beta, change .setGroup(0) to .setGraphGroup(0)
#2
03/14/2006 (12:46 am)
Philip, thanks alot for your quick advice.

Yes, I'm using the current beta. setGraphGroup() solved the problem. I think I have
to find out the changes.

Hong Jin