Jump to content

kill off enemies


cassius
 Share

Recommended Posts

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

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

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

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

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.

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

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 ?

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...