Newbie: Fish Tutorial, animated sprite and datablocks
by Anthony Perez · in Torque Game Builder · 09/15/2008 (11:09 pm) · 0 replies
I'm working through the fish demo tutorial and I'm near the very end. If I drag out a static fish sprite and assign it my datablock as defined in the tutorial, everything works. My fish "moves" as it should. If I drag out an animated fish sprite and assign it the same datablock, my fish doesn't move or pick up the behaviors from my datablock.
I got everything else to work in the tutorial so I think I'm following along what is going on. The datablock is right from the tutorial pages:
datablock t2dSceneObjectDatablock(FishDatablock) {
Class = "FishClass";
Layer = "16";
WorldLimitMode = "NULL";
WorldLimitMin = "-66.2102 -45";
WorldLimitMax = "66.1003 45";
WorldLimitCallback = "1";
minSpeed = "5";
maxSpeed = "25";
};
On my animated fish sprite, the name "FishDatablock" does show up in the drop down list in the scripting rollout, so I know it was picked up when my project was loaded.
And I believe t2dSceneObject covers both static and animated sprites. The directions of the tutorial say to drag out an animated sprite and set the datablock as I have done. What am I doing wrong?
Thanks,
Tony
I got everything else to work in the tutorial so I think I'm following along what is going on. The datablock is right from the tutorial pages:
datablock t2dSceneObjectDatablock(FishDatablock) {
Class = "FishClass";
Layer = "16";
WorldLimitMode = "NULL";
WorldLimitMin = "-66.2102 -45";
WorldLimitMax = "66.1003 45";
WorldLimitCallback = "1";
minSpeed = "5";
maxSpeed = "25";
};
On my animated fish sprite, the name "FishDatablock" does show up in the drop down list in the scripting rollout, so I know it was picked up when my project was loaded.
And I believe t2dSceneObject covers both static and animated sprites. The directions of the tutorial say to drag out an animated sprite and set the datablock as I have done. What am I doing wrong?
Thanks,
Tony
About the author