Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Killing a monster ! Dying animation
Author Message
stonecutter Offline
Member

Posts: 140
Joined: Feb 2011
Reputation: 4
Post: #1
Killing a monster ! Dying animation

As you know i am working on a combat system !
http://www.frictionalgames.com/forum/thr...ate+entity

But now i have no idea how to manage to let the enemy die.
Currently the monster fades away , but i want to have a kind of dying animation ( falling to ground ).

Way 1 i thought of :
- remove the enemy when it dies
- put at the same place a enemy model with ragdoll ... it will automatically fall to the ground due to physics

way 2 :
- let the monster play an animation and replace it with a ragdollcopy.

but there is one big problem !

how can i add an entity at the same place as anothere entity is ? And dont forget the monster is moving around and wont die at the same place everytime !

Is it possible to stick an area to a monster so the area will follow the monster ?


Now its up to you . Take your brain and give me some input how you think you will solve this issue !

We Shall Arise - Death / Grind from Bavaria
Musicvideo : http://goo.gl/HzxvLK
Facebook : http://goo.gl/9YfYCV
Free Album : http://goo.gl/sEBW2X
(This post was last modified: 04-05-2012 12:50 PM by stonecutter.)
04-04-2012 02:34 PM
Find all posts by this user Quote this message in a reply
Datguy5 Offline
Senior Member

Posts: 628
Joined: Dec 2011
Reputation: 12
Post: #2
RE: Killing a monster ! Dying animation

You could download a grunt ragdoll from the development resources section.Then just script so the enemy fades and the ragdoll is activated Smile

04-04-2012 03:25 PM
Find all posts by this user Quote this message in a reply
JetlinerX Offline
Senior Member

Posts: 599
Joined: Jun 2011
Reputation: 19
Post: #3
RE: Killing a monster ! Dying animation

(04-04-2012 03:25 PM)Datguy5 Wrote:  You could download a grunt ragdoll from the development resources section.Then just script so the enemy fades and the ragdoll is activated Smile

^ Wont work. The enemy wont be killed in the same spot every time, he would need some way to track the grunt, until it dies, and then have the ragdoll spawn exactly where it died. As to how? I have no idea.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-04-2012 03:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
stonecutter Offline
Member

Posts: 140
Joined: Feb 2011
Reputation: 4
Post: #4
RE: Killing a monster ! Dying animation

(04-04-2012 03:40 PM)JetlinerX Wrote:  ^ Wont work. The enemy wont be killed in the same spot every time, he would need some way to track the grunt, until it dies, and then have the ragdoll spawn exactly where it died. As to how? I have no idea.
Yeah right ... thats the problem we have to solve Sad
I have an idea ... Just create so much thin areas .... place them around the area the monster walks and check at with which area the monster collides when it dies ....
but this will mean placing about 50 - 100 areas for each monster ...
Is it possible to return a number like you can do in programminglanguages ?

like

for (i=1,i<=100,i++){
if monster collide area_+i;
return i;
}

We Shall Arise - Death / Grind from Bavaria
Musicvideo : http://goo.gl/HzxvLK
Facebook : http://goo.gl/9YfYCV
Free Album : http://goo.gl/sEBW2X
04-04-2012 07:37 PM
Find all posts by this user Quote this message in a reply
stonecutter Offline
Member

Posts: 140
Joined: Feb 2011
Reputation: 4
Post: #5
RE: Killing a monster ! Dying animation

Added to the code :

PHP Code: (Select All)
for (int i 1i<=2; ++i){
        if(
GetLocalVarInt("MonsterHitCounter_"+i)==4){
             for(
int a 1a<=5; ++a){
             if(
GetEntitiesCollide("gun_target_"+i,"ScriptArea_"+a)==true){
             
FadeEnemyToSmoke("gun_target_"+ifalse);
             
CreateEntityAtArea("Test","corpse_scientist02_ragdoll.ent","ScriptArea_"+a,false);
             }
             
            } 


Now if the enemy dies ... there will be created a ragdoll at the area the enemy dies !
But you have to set a lots of ares ( around the path the enemy walks ) as you can see in the picture !

EDIT :
One new big problem to solve is ... if the enemy collides two areas at the same time it will create two ragdoll bodies...


Attached File(s)
.jpg  Combat.jpg (Size: 207.41 KB / Downloads: 47)

We Shall Arise - Death / Grind from Bavaria
Musicvideo : http://goo.gl/HzxvLK
Facebook : http://goo.gl/9YfYCV
Free Album : http://goo.gl/sEBW2X
(This post was last modified: 04-05-2012 01:27 PM by stonecutter.)
04-05-2012 12:50 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)