Scripting questions, discussions, etc

Hodo33
Posts: 104
Joined: Fri Dec 29, 2017 4:34 pm
I have a door with a wheel that turns when you open it. When you close the door it should turn the wheel the other way.

This does not work.... seems stopThread resets the seq to frame 0
I changed the anim to not be cyclic and still does not work.
What am I doing wrong here?

Azaezel
DEVGRU
Posts: 497
Joined: Tue Feb 03, 2015 9:50 pm

function smartPlayThread(%obj,%anim,%direction)
{
if (!isObject(%obj)) return;
%obj.inTransition = true;
if (%direction)
{
}
else
{
//play anim backwards
}
//while were at it, trip any synced animations for stuff mounted to us
%count = %obj.getMountedObjectCount();
for (%i=0; %i<%count; %i++)
{
}
}
I use this a lot, personally.