TinkofSharn on 13/5/2008 at 09:30
I've got a few unusual items from the actor browser that have been rigidly attached to various AI's in my mission along with the usual purses. The items can be pickpocketed fine but if Garrett is feeling nasty and kills one of the AI's the unusual items do not detach from the parent AI. However, the standard loot does, furthermore purses fall to the ground and are then nice and easy for Garrett to pick up.
To fix my custom droppable items I added the following script to the AI's carrying these objects.
AIDropItems: -
CONDITIONS
- Logic (OR)
- When AI is disabled by the player with [StimulusType_UnbindingBlackjack]
- When this AI is killed by the player
ACTIONS
- Sever rigid attachment links named [Loot] and add objects to physics
This got me one step further, the AI now falls to the ground dead but the items hover in mid air. So I though it might be that there was no "physics" parameters on my items, and I was right...
So I added the following: -
Physics: -
- Friction = 0.5
- InitialHavokState = Havok_Havok_Controlled
- MassPounds = 5
PhysicsSound: -
- ObjWeight = Weight_Light
After adding these the objects still hover in mid air when the AI's are killed.
My next step to resolve this is to start changing the havok states in the above AIDropItems script.
I'd welcome any nuggets of wisdom from anyone else who has overcome these kinds of issues.
Tink.