Script a creature to pick up an item and equip it - how?
chimeric
Member Posts: 1,163
I'm looking for a way to script a creature to look around for usable items, on the ground, get them and equip them. Is that possible?
0
Comments
What I suspect you have in mind, unfortunately, is exactly as CamDawg says.
The only action I'm aware of is PickUpItem() which requires exact item code, so everybody would need a custom script to pick up their personal set of equipment.
The issue with range is that if the corpse's sword has been picked up and another one dropped somewhere else, he'll likely be stuck in place trying to get the second one. The action will sense an item anywhere on map and attempt to execute itself, but the execution part only works correctly when item is within actor's LoS. And you can't exactly check the distance to the nearest item on the ground - unless you can somehow detect the ground pile's container entry, which I'm unaware if possible, - so it's a problem.
Speaking of limitations here, I can probably script the creature to only try and pick up that sword if it's got nothing equipped already etc.
Oh, wait. It's in the guide.