f3cuk / WICKED-AI

Wicked AI missions for your server
30 stars 59 forks source link

Improve weapon clean up from bodies. #106

Closed UKCPirate closed 10 years ago

UKCPirate commented 10 years ago

Old Clean bodies code cleared everything, not good if AI have keys on them. This code clears only primary weapon and ammo leaving everything else. I am thinking if you don't want the AI to have such things you can set ai_gear array empty? Also updated road kills to remove everything from an AI, e.g including any keys.

UKCPirate commented 10 years ago

TBH the _weaponclips array contains many duplicates. I tried the following but it didn't work 'if !(_weaponclip in _weaponclips) then { existing add clip to clips code };'

f3cuk commented 10 years ago

You're kind of abusing vars here. damageweapon is meant to damage only the weapon and not the rest, if you want an option like that please add it seperately.

About the key thing, why not add the key to a dead body on mission complete? Bodies get cleaned on death and you can safely add something to it later without it being removed, seems a lot easier then your solution :)

UKCPirate commented 10 years ago

Sorry. I'll remove that bit or maybe make another option.

I don't know how to do that but I will look.

I think the option to remove ALL AI gear is unnecessary. They can already be set to spawn with no backpack and/or gear. So if you wanted AI with only a weapon on their dead body but no gear or backpack, its possible. However there is option to remove the weapon and ammo, leaving the items and tools. Maybe somebody has a better solution.

UKCPirate commented 10 years ago

How do I now delete this pile of poo?

nerdalertdk commented 10 years ago

Just close the pull at the bottom

UKCPirate commented 10 years ago

FFS its still here!

f3cuk commented 10 years ago

It is supposed to stay here for future reference :) Don't worry about it, pull request is closed now

UKCPirate commented 10 years ago

For reference of how not to do it?