Author Topic: setSequence problems  (Read 1642 times)

I've been trying to execute animations for this, and I've also been testing the animations with base/data/shapes/player/m.dts, but doing anything with setSequence won't work unless I call AvatarGui.onWake();. Anyone know why this is and/or how to get around it to use setSequence for other objects?

I tried this for my object view.

ObjectView.setSequence("",3,"walk",1);

function
ObjectView::setSequence(name,threadNum,threadSequence,timescale);

(Timescale 0.2 - 2)

I tried this for my object view.

ObjectView.setSequence("",3,"walk",1);

function
ObjectView::setSequence(name,threadNum,threadSequence,timescale);

(Timescale 0.2 - 2)
Tried that. Animations still won't play until you do AvatarGui.onWake();. So does this mean that the AvatarGui is doing something to the ObjectView (Avatar_Preview) when it gets opened? I can't figure this out. I tried looking at Subpixel's AvatarPhoto, but it even calls AvatarGui.onWake();.
EDIT: I think it might be adding the animations when it's viewed, somehow.
« Last Edit: April 22, 2014, 05:50:54 PM by Ninjaman 4 »

Here is how you do it

%objview.setObject(%NAME,%path,%skin,%lod);

now, %NAME must be refered to again to apply the sequence to the object you drew.

%NAME is the name of the object you are drawing, so...

%objview.setSequence(%NAME,%threadnum,%sequence,%timescale);

should work if %NAME from both are the same/

ObjectView.setSequence("",3,"walk",1);

wont work because you arent refering to the object's name.

wont work because you arent refering to the object's name.
it does work

it does work

What i mean by that, is he isnt refering to the object he NAMED

He gave his object a name
ObjViewCtrl.setObject(ObjViewCtrl.dynamicObject, %obj, "", "");

When you do sequences, it should be:

ObjViewCtrl.setSequence(ObjViewCtrl.dynamicObject,%threadnum,%sequence,%timescale);

What i mean by that, is he isnt refering to the object he NAMED

He gave his object a name
ObjViewCtrl.setObject(ObjViewCtrl.dynamicObject, %obj, "", "");

When you do sequences, it should be:

ObjViewCtrl.setSequence(ObjViewCtrl.dynamicObject,%threadnum,%sequence,%timescale);

So what you're saying is that what I need to do is create a dynamic object for ObjViewCtrl (which I did by ObjViewCtrl.dynamicObject = "ObjDynam";), and use ObjViewCtrl::(StuffHere)(ObjViewCtrl.dynamicObject, %this, %things, %that); to refer to the object of the ObjViewControl?
EDIT: However, figure this out - anything other than ObjView that uses the player's dts and ObjectViewCtrl that calls AvatarGui.onWake();(eg. Avatar_Preview), doesn't need the object of the control to be referred to. Avatar_Photo.setSequence("", 1, activate, 1); works.
« Last Edit: April 22, 2014, 07:23:28 PM by Ninjaman 4 »

So what you're saying is that what I need to do is create a dynamic object for ObjViewCtrl (which I did by ObjViewCtrl.dynamicObject = "ObjDynam";), and use ObjViewCtrl::(StuffHere)(ObjViewCtrl.dynamicObject, %this, %things, %that); to refer to the object of the ObjViewControl?
EDIT: However, figure this out - anything other than ObjView that uses the player's dts and ObjectViewCtrl that calls AvatarGui.onWake();(eg. Avatar_Preview), doesn't need the object of the control to be referred to. Avatar_Photo.setSequence("", 1, activate, 1); works.

All you did was create a string??? How does it make it a dynamic object? The reason AvatarPreview uses "" is because the string for the name was "". Either change your objects name to "" or make setSequence use your objects name.

ObjViewCtrl.setObject(ObjViewCtrl.dynamicObject, %obj, "", "");

ObjViewCtrl.setSequence(ObjViewCtrl.dynamicObject,%threadnum,%sequence,%timescale);

to

ObjViewCtrl.setObject("", %obj, "", "");

ObjViewCtrl.setSequence("",%threadnum,%sequence,%timescale);

The first argument of these functions is a string, the name of the object.
« Last Edit: April 22, 2014, 07:38:43 PM by Wrapperup »

All you did was create a string??? How does it make it a dynamic object? The reason AvatarPreview uses "" is because the string for the name was "". Either change your objects name to "" or make setSequence use your objects name.

ObjViewCtrl.setObject(ObjViewCtrl.dynamicObject, %obj, "", "");

ObjViewCtrl.setSequence(ObjViewCtrl.dynamicObject,%threadnum,%sequence,%timescale);

to

ObjViewCtrl.setObject("", %obj, "", "");

ObjViewCtrl.setSequence("",%threadnum,%sequence,%timescale);

The first argument of these functions is a string, the name of the object.
Oh, okay. That clears it up a bit. However, I tried that and it still doesn't work. Check this.
I feel so like... stupid. I am doing something horribly wrong?

Try fiddling around with these functions:
ObjViewCtrl.setCamera();
ObjViewCtrl.setCameraRot(%floatx,%floaty,%floatz);
ObjViewCtrl.setOrbitDist(%floatdist);


Wait no you need to instantiate a TSShapeConstructor. You're probably going to need to look for the .dsq files (\base\data\shapes\player\m_*.dsq) and then generating the TSShapeConstructor.

Generate the TSShapeConstructor datablock before playing the sequence.
« Last Edit: June 05, 2014, 10:12:42 AM by Axo-Tak »