cassius Posted October 15, 2012 Share Posted October 15, 2012 Has anyone got a one shot ( single) animation example in c or c++ they are willing to share? Its the only thing holding up further progress. in this case its a characters "death sequence but I will take anything. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted October 15, 2012 Share Posted October 15, 2012 Well I'm not sure how you have it set up... but the only difference is that you just stop animating the character once that death animation finishes instead of looping it... Do you have any more detail on the problem you are having with it? it can differ greatly between animation systems exactly how you do it. Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
cassius Posted October 15, 2012 Author Share Posted October 15, 2012 Heres what I have.Character freezes when function is called. void kill_badguy() { Animate(badguy.model,badguy.k_framebegin,1,true) ; badguy.k_framebegin = badguy.k_framebegin + 0.5* AppSpeed() ; if (badguy.k_framebegin >= badguy.k_frameend ) { badguy.stopanim = true; } } Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
macklebee Posted October 15, 2012 Share Posted October 15, 2012 perhaps it has to do with the fact you have a boolean true in for the sequence parameter? void Animate( TEntity entity, flt frame, flt blend=1, int sequence=0, int recursive=1 ) and are you sure that 'badguy.k_framebegin' is definitely starting with a value you think its starting with? I would put some Print statements in there to verify it is actually not already greater or equal to the 'badguy.K_frameend' value to begin with... Edit- and is the function 'kill_badguy()' being constantly called until 'badguy.stopanim' is true? if not, then just calling the function once will just animate one frame of the death sequence. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cassius Posted October 15, 2012 Author Share Posted October 15, 2012 I just got the Blitzmax version working with the bmax version of the code above unaltered.The function gets called every time it goes round the game loop.( or am I missing something.) FreeEntity also works in bmax with nothing else needed because of built in garbage collection. I would like to get it working in c as I have put a lot of work into that version. EDIT: I free the enemy controller once the character is "dead". Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
cassius Posted October 15, 2012 Author Share Posted October 15, 2012 You were right Macklebee . A missing sequence paremeter was the cause.its not missing in the Bmax version. Thanks mack. Thanks Scarlet. Now you have given me a decision to make. Should I continue in c or Blitzmax? I think both. it will be interesting to compare performance. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.