Author Topic: Milkshape Animation  (Read 1815 times)

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...

Ive heard that with the name "Ambient", the animation should play auto.

I've never heard of such a thing.

I just don't see why an animation would end up in Materials. Is that normal?

Yes.

Should I apply the 'material' to my model for the animation to run properly?


No.

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

Yes.
You put the name of the sequence/animation in the "State Sequence" part of the script.
« Last Edit: April 02, 2011, 01:20:44 AM by Blastdown »

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)
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...
« Last Edit: April 02, 2011, 01:40:26 AM by Mr.Noßody »

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

It says something like
Code: [Select]
function gunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
Parent::onFire(%this,%obj,%slot);
}
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.

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

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

Yea, that's in the export.
Azerath called it Cycle..

My animation is exported as such.

Okay, went into my coding and swapped 'Shiftaway' with my animation 'Ambient'..
Ironical, Shiftaway was still what it was called..
Ill report back soon.
Simply doing that didn't work. The projectile still stays static when shot.
« Last Edit: April 02, 2011, 12:24:02 PM by Mr.Noßody »

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

It says something like
Code: [Select]
function gunImage::onFire(%this,%obj,%slot)
{
if(%obj.getDamagePercent() < 1.0)
%obj.playThread(2, shiftAway);
Parent::onFire(%this,%obj,%slot);
}
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.


Thats the animation the player plays when he shoots the gun, not the animation the gun plays

Thats the animation the player plays when he shoots the gun, not the animation the gun plays
So, what should I add/edit to specify a projectiles animation?

Thats the animation the player plays when he shoots the gun, not the animation the gun plays
Wrong. All weapon animations are played through the player object.


And Nobody, wait, you want the projectile to perform an animation?

And Nobody, wait, you want the projectile to perform an animation?

Correct, like how the Rocket Launcher makes a spinning rocket...

Correct, like how the Rocket Launcher makes a spinning rocket...
There is a default projectile spin value...

It isn't an animation.

There is a default projectile spin value...

It isn't an animation.
Hm, what specifys this?
Also, what would I have to do make it tumble end over end like the stick grenade if its not a model animation?
« Last Edit: April 03, 2011, 02:11:44 AM by Mr.Noßody »

...Man, being able to animate a projectile would be so useful..

Hm, what specifys this?
Also, what would I have to do make it tumble end over end like the stick grenade if its not a model animation?
Look at scripts that already do this.

Look at the rocket projectile code, and one of bushi's grenades for clues on what to do.

Look at scripts that already do this.

Look at the rocket projectile code, and one of bushi's grenades for clues on what to do.

Those are the first things I looked at. Didn't recognize any projectile spin factors...
But also, I don't know what I'm essentially looking for to begin with , so...