cassius Posted August 8, 2011 Share Posted August 8, 2011 I got sword and axe fights in my game and at some point meed to kill off characters by invoking their "die" anims.At the moment I have hidden sensors in the floor that activate the die anim, but can anyone suggest another method? I don't have access to a characters limbs or anything like that 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...
Canardia Posted August 8, 2011 Share Posted August 8, 2011 Make a Character class, which has a method Die(), which then starts the die animation, and also sets some flags that it doesn't move anymore. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Pixel Perfect Posted August 8, 2011 Share Posted August 8, 2011 The usual method is to have a health value which is decremented each time the NPC is struck. Once zero health is reached your code would trigger the death animation and remove the NPC as an active character in the game. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
cassius Posted August 8, 2011 Author Share Posted August 8, 2011 Thanks. I HAVE set a flag to stop the anim repeating. I also tried pixels method but nothing happened. maybe the health start number was not high enough. 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...
Pixel Perfect Posted August 8, 2011 Share Posted August 8, 2011 Thanks. I HAVE set a flag to stop the anim repeating. I also tried pixels method but nothing happened. maybe the health start number was not high enough. I'm not sure I understand what you mean by 'nothing happened'. Do you mean it died instantly ? Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
cassius Posted August 8, 2011 Author Share Posted August 8, 2011 I set too low a health number. got it working now. countdown starts at 300.0 and decreases by 0.1 until 1 or less. 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.