Game Development Community

GuiObjectView and setSeq...

by Quinton Delpeche · in Torque Game Engine Advanced · 08/06/2008 (1:05 pm) · 4 replies

I have run into another slight hiccup with my current project. I am using the stock TGEA GuiObjectView and I have managed to get the model to show and a weapon mounted to the model but unfortunately I can't get the setSeq to actually fire off the sequence.

The model just appears in its normal state, as indicated below:
www.novogeek.org/files/soulwars/website/Object_View-001.png
I have tried several things and I am still unable to get the GuiObjectView to actually play the animation.

Ok is it just me or is there something fundamentally missing in this code???

void GuiObjectView::setObjectAnimation(S32 index)
{
   if ((0 > index) || (index > MAX_ANIMATIONS))
   {
      Con::warnf(avar("GuiObjectView: The index %d is outside the permissible range. Please specify an animation index in the range [0, %d]", index, MAX_ANIMATIONS));
      return;
   }

   mAnimationSeq = index;
}

It sets the "S32 mAnimationSeq;" to the value but actually doesn't do anything with it ... huh???

About the author

Gobbo Games is an Independent Games Development company operating from Durban in South Africa. We believe in creating high-quality cost-effective games that remain true to the belief of Independent Game Developers around the world.


#1
08/08/2008 (12:45 am)
Just an update on this ... I have even gone as far as to place this control ont my PlayGUI so there can be no excuses about models not being loaded correctly or something like that ... and it still doesn't work.

I have tried putting the setSeq before and after the setModel call ... and still nothing.

Can somebody check this for me, I have even put this in the stock Stronghold mission in TGEA 1.7.1.

In playGui.gui:
new GuiObjectView(modelViewer) {
   profile = "GuiContentProfile";
   horizSizing = "width";
   vertSizing = "height";
   position = "12 25";
   extent = "274 333";
   minExtent = "274 333";
   visible = "1";
   helpTag = "0";
   cameraZRot = "0";
   forceFOV = "0";
};

In playGui.cs:
modelViewer.setModel("scriptsAndAssets/data/shapes/player/player.dts");
modelViewer.setSeq(0);

I really don't know what else to try anymore.
#2
08/11/2008 (9:53 am)
I am Having the same Problem. Not sure where we are messing this up, heh. Ill try different things, Ill keep this updated as much as I can.

Mike
#3
08/18/2008 (11:41 am)
I have even gone back to a complete clean system ... it is scratch built and has nothing fancy in it ... not even a menu just a base gui with this object and yet I still can't get it to work.

This base system uses just the standard TGEA 1.7.1 and nothing else ... so I am now officially out of ideas.

Anybody else have some ideas regarding this?
#4
09/11/2008 (9:00 am)
Yes, make sure you time it properly so that the model and then sequence are loaded first, then you can set it.

in TGE, process is:
load model
(model is loaded...)
load sequence
(sequence is loaded...)
set sequence

I had to add in callbacks for model loaded and sequence loaded as they really are asynchronous operations which take time.

Often the calls to load and set a sequence happens before the model is loaded if you write it without some timing considerations.