B3D help
Blitz3D Forums/Blitz3D Programming/B3D help
| ||
If EntityDistance(AI1,play2)<100 And EntityDistance(AI1,play2)>10 If animatedai1=0 Then aianimate1=1 ai1move=1 Else ai1move=0 aianimate=0 EndIf If aianimate1=0 Then Animate AI1,1,0,ai1p1,10 If aianimate1=1 Then Animate AI1,1,.5,ai1p1,10 : animatedai1=1 If ai1move=1 Then PointEntity AI1,play2 : MoveEntity AI1,0,0,.3 ai1animate=0 Can someone please help me please the B3D file will not animate, i am at the frustration level of just making the dang thing walk and have no idle animation. This is in the loop |
| ||
It's possible that you've mixed up your variable names. You use: aianimate1, ai1animate & aianimate Should aianimate & ai1animate not be aianimate1? Also, just a observation but you don't need to call entitydistance twice. Distance# = entitydistance( AI1, play2 ) if Distance < 100 and Distance > 10 Stevie |
| ||
Btw animate has to be called just once to let make start, otherwise you will see only the first frame. |
| ||
How do you know that the model is actually animated? |
| ||
Animating ( entity ) |
| ||
I'm sorry but i really do not understand this, here is what i came up with thanks to your replies. It works but i have no idea of how to play the idle animation when it gets done walking(ai1p2=idle, ai1p1=walk)Distance# = EntityDistance( AI1, play2 ) If Distance# < 100 And Distance# > 10 And PlayerY<60 If Not Animating(AI1) Then Animate AI1,1,.5,ai1p1,10 ai1move=1 Else If Animating(AI1) Then Animate AI1,1,0,ai1p2,10 ai1move=0 EndIf If ai1move=1 Then PointEntity AI1,play2 : MoveEntity AI1,0,0,.3 |
| ||
I suppose you do your distance check every frame? Every time you execute the animate command it starts playing the animation from the first frame... If you execute the animate command every frame you won't animate anything :) |
| ||
i know this, i already have it where the code calls the animate command once, and the character moves just right, but whenever it stops i would like it to idle, can you please look at my code. I cant seem to put together enough logic to code it. |
| ||
Animating ( entity ) Not that...how does Blitz Monkey know that the mesh was exported with animation at all? |
| ||
wow really i'm not that dumb... i am only 15 so give me some leeway, I downloaded the zombie model from http://www.psionic3d.co.uk/ I have already ran the animations in a raw program but it will not work in my previously coded game... |
| ||
Doesn't calling Animate over and over again in a loop cause the animation to freeze? And you did use UpdateWorld, right? Maybe it is more straightforward using SetAnimTime rather than Animate. Ie: SetAnimTime AI1, Millisecs() * 0.001 |
| ||
1st extract ur animations like this: walkanim = ExtractAnimSeq(model, animation frame) ;blah then apply it to an if command in the while or repeat loop like so: good luck! |
| ||
please read this http://www.blitzbasic.com/Community/posts.php?topic=87192 |