Enemies dropping items ??
I'm wondering if it's possible to create a kismet script that would have enemies drop items like meshes, weapons(ones they aren't using) after they die ? Like in Diablo where they drop loot. I would really like to know how since I have been trying to do so for hours but still couldn't find a good solution that would work with all cases.
Alright, I Managed to find a solution.
What was your solution, if you don't mind sharing?
I have not tried this but I would explore this like this...
1) Attach a death event to the object we want to drop something
2) When it dies gets its position (with get property) as vector (a point in 3D space)
3) Use an actor factory to spawn the desired item at that location
Note : If this is from a enemy I don't know where on the mesh the the origin will be so you may have to hack in an offset if you spawned object is spawning in the floor.
4) Make sure the thing you spawn is a K-Actor if it is not convert its collision type to a K actor type (which means this object is now physics enabled, you might not need to do this but thing you spawned may be floating in the air.)
4a) Apply an physics impulse by applying a (small amount) damage type that has physics impact like a grenade or rocket so it will fall to the ground.