Blockland Forums > Modification Help

Milkshape Animation

Pages: (1/4) > >>

Mr.Noßody:

I got an animation all done and ready to go. But for some reason the animation shows up in the 'Materials' tab. When I save and export with it like this, the animation does not play as it should.
Ive heard that with the name "Ambient", the animation should play auto.

I just don't see why an animation would end up in Materials. Is that normal? Should I apply the 'material' to my model for the animation to run properly?

Or is it because I need a line of code that specifies the animation, which I doubt...

Blastdown:


--- Quote from: Mr.Noßody on April 02, 2011, 01:09:13 AM ---Ive heard that with the name "Ambient", the animation should play auto.

--- End quote ---

I've never heard of such a thing.


--- Quote from: Mr.Noßody on April 02, 2011, 01:09:13 AM ---I just don't see why an animation would end up in Materials. Is that normal?

--- End quote ---

Yes.


--- Quote from: Mr.Noßody on April 02, 2011, 01:09:13 AM ---Should I apply the 'material' to my model for the animation to run properly?


--- End quote ---

No.


--- Quote from: Mr.Noßody on April 02, 2011, 01:09:13 AM ---Or is it because I need a line of code that specifies the animation, which I doubt...

--- End quote ---

Yes.
You put the name of the sequence/animation in the "State Sequence" part of the script.

Mr.Noßody:


--- Quote from: Azerath on December 31, 1969, 07:00:01 PM ---4th: You will have to have to name it. If you want it to use the animation you made when you fire, in the name box, type in "Fire". If you want the animation to play constantly, all the time, non-stop, make the name "Ambient". ( I don't know anymore names)
--- End quote ---
Hack quote from Azerath's Tutorial. Old topic

Hm, "State Sequence" eh? Ill look for it and report back.
Okay, I checked my code for "State Sequence" and found 4..

Now, what should I edit/add to specify a looping animation for a shot projectile?

..I feel like such a moron asking so many questions...

Treynolds416:

Look at the bottom of the example gun script provided by Azerath

It says something like

--- Code: ---function gunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
Parent::onFire(%this,%obj,%slot);
}
--- End code ---
The number after %obj.playThread (2 in this case) is what sequence the animation is being played in. If you want it to play when you fire, leave the number as 2. The next argument after %obj.playThread is which animation to play. You have to name your animations in the torque exporter. Then, swap out 'shiftaway' with your animation.

If you want to have the animation cycle while you are shooting, you will have to change some of the state-system.

But don't get into cycling yet, just try that first to see if it works.


Uxie:

Wait, isn't auto "cyclic"? There is a check box for that.

Pages: (1/4) > >>

Go to full version