PDA

View Full Version : When making a custom animation...



CodeBrain
May 16th, 2009, 07:18 PM
How would I compile it?

No, I am not talking about the animation a biped/vehicle/whatever needs, I mean a animation that could be used only when it is called on via script.

Like, I want to have a pelican move through a city, and deposit marines/player, however I have no idea what to call the animation or what to compile it as.

Any ideas will be given rep :D

Fixed, now the only thing is that when I play the custom animation, the pelican doesnt move.

Fix?

teh lag
May 16th, 2009, 07:24 PM
Given your description, you would export as a .jmw (world-relative animation). I don't think blitz can export .jmw files, but you can just rename the file extension as all exported data is the same. The anim would then be compiled into its own tag and is called ingame with


(custom_animation <unit> <animation_graph> <string> <boolean>)

starts a custom animation playing on a unit (interpolates into animation if last parameter is TRUE)

With jmw, you have to animate the object in a scene where 0,0,0 is the origin of the BSP. You just use the normal node setup, nothing special required.

FRain
May 16th, 2009, 07:56 PM
For this, have your BSP geometry in the scene so you have a good point of reference.

Advancebo
May 16th, 2009, 09:30 PM
I never knew this either, thanks.

CodeBrain
May 16th, 2009, 11:25 PM
Okay, so I made the animation, and compiled it with tool.

It gave me this:


model animation compression saved 0 bytes

Which I think means that it worked. The problem is, I cannot seem to find it. Where would it of been compiled?

I used "levels\test\newmombasa\pelican\animations\pelican_ enter_animation.jmw"

Any idea where it is hiding? :D

FRain
May 16th, 2009, 11:27 PM
it would be in levels\test\newmombasa\pelican

Also, did it say:

#pelican_enter_animation.jmw
model animation compression saved 0 bytes

or just
model animation compression saved 0 bytes

if the latter, then it didn't work, if the former, then it worked, and look where I said to.

CodeBrain
May 16th, 2009, 11:31 PM
It said the second one.

Here is what I put in tool:


tool animations levels\test\newmombasa\pelican\animations

Looking at it now, I see I fucked up. :downs:

Fixing it now.

FRain
May 16th, 2009, 11:39 PM
Get on msn.

CodeBrain
May 16th, 2009, 11:41 PM
Now that it's fixed, and gone through tool, I have another problem.


05.17.09 00:38:50 this is not a reference to a animation_graph tag.: levels\test\newmombasa\pelican "" 1))


This is how I am typing it in Sapien:

custom_animation pelican "levels\test\newmombasa\pelican\pelican_enter" "" 1

Where pelican_enter is my animation.

How would I fix this?

Edit: Fixed, now the only thing is that when I play the custom animation, the pelican doesnt move.

Fix?

CodeBrain
May 16th, 2009, 11:53 PM
Updated last post.

p0lar_bear
May 16th, 2009, 11:57 PM
So you have a tag in levels\test\newmombasa\pelican called pelican_enter.model_animations?

CodeBrain
May 16th, 2009, 11:57 PM
The animation tag thing I got fixed, however the pelican doesnt move when I call the animation to do so.

p0lar_bear
May 17th, 2009, 12:17 AM
Because you're not telling it which animation to use from the graph; that's what the <string> parameter is for.

Animation tags aren't made with single animations in mind. In the function, you define what graph to pull the desired animation from, then tell it which animation is the one you want. Open the tag, and then look at the animations block to get the name of the animation to play from the tag (which, I'm guessing, is pelican_enter).

CodeBrain
May 17th, 2009, 12:19 AM
Thats what I'm doing p0lar, look:

custom_animation pelican "levels\test\newmombasa\pelican\pelican_enter" "pelican_enter_animation" 1

Pelican_enter_animation is the animation, while pelican_enter is the graph file.

Using the code above makes the pelican do nothing.

CodeBrain
May 17th, 2009, 01:17 AM
Okay, this is the final code:

custom_animation pelican "cinematics\levels\test\newmombasa\pelican\pelican" "pelican" 1

However, the pelican does not move at all. It'll go down, but it wont do the animation.

Any ideas why?

Advancebo
May 17th, 2009, 12:30 PM
Is it a different pelican than the one you used to animate?

CodeBrain
May 17th, 2009, 01:42 PM
I figured out the problem, it was the node list check number being different than the models. I changed it so it matches, and now it works.

Now scripting the map, I run into this when compiling the script:


i expected "script" or "global".: custom_animation pelican "cinematics\levels\test\newmombasa\pelican\pelican" "pelican" 1)



And here is my script:


(script static "unit" player0
(unit (list_get (players )0 )))

(script startup sp_load

(unit pelican)
(object_create_anew pelican)
(object_teleport pelican pelican_start)
(unit_enter_vehicle (player0) pelican "P-riderLF"))
(custom_animation pelican "cinematics\levels\test\newmombasa\pelican\pelican" "pelican" 1)
(sleep 525)
(unit_exit_vehicle (player0))
)

Choking Victim
May 17th, 2009, 02:00 PM
(script static "unit" player0
(unit (list_get (players) 0))
)

(script startup sp_load
(unit pelican)
(object_create_anew pelican)
(object_teleport pelican pelican_start)
(unit_enter_vehicle (player0) pelican "P-riderLF")
(custom_animation pelican "cinematics\levels\test\newmombasa\pelican\pelican" "pelican" 1)
(sleep 525)
(unit_exit_vehicle (player0))
)Try that.

CodeBrain
May 17th, 2009, 02:06 PM
Will do, Ill edit when Im done testing

CodeBrain
May 17th, 2009, 09:09 PM
Fixed.

CodeBrain
June 1st, 2009, 07:16 AM
A new problem has come up.

This is about the pelican. When playing the custom animation I made for it, during parts of the animation the pelican disappears. It then reappears for the rest of the animation.

However, one thing I should note is that if I replay the animation again, the pelican doesn't disappear at all.

Any idea why this happens?

CodeBrain
June 1st, 2009, 06:01 PM
God damnit you guys you know what it means but your not posting :(

You guys are making meh sad :'(