Updated Giant Wasp Hive

Updated Giant Wasp Hive.  Got the Outcasts spawning with clothes on. Full compile.
This commit is contained in:
Jaysyn904
2022-12-06 00:36:59 -05:00
parent 1cbe12fdda
commit 16a00a66f5
60 changed files with 2607 additions and 36808 deletions

View File

@@ -0,0 +1,32 @@
// This method does not use ActionEquipMostEffectiveArmor() and is a workaround
// to allow equipping clothing. It will equip any armor in the entering object's
// inventory. It can easily be modified to be used on a NPC's spawn script, but
// this is a good thing to have on a trigger around the module spawn point for
// PCs. Thanks to georage.
void main()
{
// Get the entering object
object oNPC = GetEnteringObject();
string sLocal = "DO_ONCE" + ObjectToString(OBJECT_SELF);
// Only do this once, and only to NPCs
if(GetLocalInt(oNPC, sLocal) || GetIsPC(oNPC)) return;
// Set to not do it again
SetLocalInt(oNPC, sLocal, TRUE);
// Loop the object's inventory and equip the first
object oItem = GetFirstItemInInventory(oNPC);
while(GetIsObjectValid(oItem))
{
// Check if armor, of course
if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR)
{
// Equip it and stop the script
AssignCommand(oNPC, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
return;
}
oItem = GetNextItemInInventory(oNPC);
}
}