Ask here your questions to get help using GDevelop.
By Evil_Pancake
#64254 Hi,I'm new here,Is it possible to make terraria style gibbing death animation by deleting the player after the player collide with an enemy and replacing it with multiple gib parts by creating the objects?If so how?Also any tips on making splashing blood particles?Thanks :D
By MattLB
#64276 It's certainly possible, it's just a question of whether it is better to do it in animation or with moving objects.
I'm trying to decide a similar thing for smashing a rock. I want it to break into small pieces that scatter and then disappear.

The basic idea with objects would be to create a cluster of "bit" objects at the centre of the dead player and give them a random force in a random direction (with a non-zero damping), but with a constant force applied straight down (at 90°) so that they eventually fall to the ground. You can then check for collision with a ground object and delete them.

Alternatively, if you give the bits a physics behaviour they will automatically move and behave like the bones of a skeleton do in Terraria.

For blood spatters you could use a particle object in shades of red, but I'm not sure about convincing splashing.
By Evil_Pancake
#64322
MattLB wrote:It's certainly possible, it's just a question of whether it is better to do it in animation or with moving objects.
I'm trying to decide a similar thing for smashing a rock. I want it to break into small pieces that scatter and then disappear.

The basic idea with objects would be to create a cluster of "bit" objects at the centre of the dead player and give them a random force in a random direction (with a non-zero damping), but with a constant force applied straight down (at 90°) so that they eventually fall to the ground. You can then check for collision with a ground object and delete them.

Alternatively, if you give the bits a physics behaviour they will automatically move and behave like the bones of a skeleton do in Terraria.

For blood spatters you could use a particle object in shades of red, but I'm not sure about convincing splashing.

Yes,exactly what i wanted thanks :D ,is there a way i can create multiple object using 1 action?also do i have to use multiple commands to apply force at each gib parts?
User avatar
By Jubeliuksen3
#64323
Yes,exactly what i wanted thanks :D ,is there a way i can create multiple object using 1 action?also do i have to use multiple commands to apply force at each gib parts?


I made a video about that kind of death animation. If it's not perfect, it might be useful :)
https://www.youtube.com/watch?v=UbCaVkTd8Sc
By MattLB
#64328
is there a way i can create multiple object using 1 action?


Multiple objects in one action is no problem at all.

Create object head at position...
Create object left_arm at position....
Create object right_arm at position...
etc.
If all these objects are created in one action they will appear to be created instantly and simultaneously.

also do i have to use multiple commands to apply force at each gib parts?

If the bodypart objects have a physics behaviour then they will fall over and knock into each other without you having to do anything. If you wanted to send the head up and the right arm to the right and things like that then you'd need a separate force action for each bodypart object.

If you're not fussy about the direction, then you could apply a random force in a random direction to all the bodypart objects at once if you put them in a group.

Actually, I see that all of this is what Jubeliuksen3's example does, so you have a nice template.