Animation Question

Blitz3D Forums/Blitz3D Programming/Animation Question

cash(Posted 2003) [#1]
I have a b3d model and have successfully extracted the anomation sequences I need, When I set the animate,1,1,1
option it animates the first sequence in a loop as expected.
And also all subsequent sequences work as well if checked separately.

What I want to do is default to sequence one but be able to call other sequences as I need them, however when I call subsequent Animate,x,x,x commands, they do not run correctly and leave the model gliding around in a non animated state.

Is there an easy way to call different sequences within the application.


jfk EO-11110(Posted 2003) [#2]
I usually save every sequence as a single File and use addanimseq, whenever possible.


cash(Posted 2003) [#3]
Does this make it easier to call different sequences in the application.

For example the default is for the character to walk around using sequence 1. The if for example he gets withing a certain distance of another object the sequence changes.

and so on....

I can run each sequence correctly but cannot get the programming correct to then change from one to another and back again.

Any ideas would be good, I will check out the addanimseq option as well, Thanks jfk for that.


cash(Posted 2003) [#4]
I think im a bit closer but results arent as expected.
If i use for example

if entitydistance(man1,man2) > 100 then animate man1,1,1,1

I do get some response from this but it does not do what I expect. I would like the animation sequence to change when entities are within a certain distance of each other. Using the commands as above it sort of works but does the opposite of what I would expect. eg the animation sequence does change but cetainly not when the man is > 100 from the target.


Any ideas ?


Ruz(Posted 2003) [#5]
yopu could use something like
if not animating then use blahh sequence.
blahh sequence would be the still pose or idle. it works fine for me.I lalso used a tween on the still sequence so every other sequence blends between it.

player_model=LoadAnimMesh( "models\stitch.b3d" )
walk=ExtractAnimSeq (player_model,0,16);sequence 1
still=ExtractAnimSeq (player_model,17,17);sequence 2
jump=ExtractAnimSeq (player_model,18,38);sequence 3


;This is go forward

If KeyDown(30) ; forward
If Animating(p\model)=p\walk
Animate p\model,3,.7,1

;this is if not animating

If Not Animating (p\model)
Animate p\model,3,0,2,5;stopped/idle

EndIf

the five at the end tells it to blend or tween animations
probably a better way to do it , but it worked for me