Custom ammunition while shifted
How do you equip custom ammunition to a shifted shape?
I gave my drider a bow in polymorph.2da and want to also equip custom arrows to the shape. I've tried the following in the module OnEquip handle:
The code fires, it sends me the message, but the arrows never equip and if I attack something it says I'm Out of Ammo.
The bow works fine with the Unlimited Ammo property, but I want to add an OnHit property that I can't get otherwise.
I gave my drider a bow in polymorph.2da and want to also equip custom arrows to the shape. I've tried the following in the module OnEquip handle:
if( sItemTag == "rl_driderbow" )
{
object oArrow = CreateItemOnObject("driderarrow1",oPC,99);
AssignCommand(oPC,ActionEquipItem(oArrow,INVENTORY_SLOT_ARROWS));
SendMessageToPC(oPC,"Drider arrows equiped.");
}
The code fires, it sends me the message, but the arrows never equip and if I attack something it says I'm Out of Ammo.
The bow works fine with the Unlimited Ammo property, but I want to add an OnHit property that I can't get otherwise.
1
Comments
The answer is yes! (I thought I tried this a long time ago and didn't think it worked)
if( sItemTag == "rl_driderbow" ) { object oArrow = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC); itemproperty ip = ItemPropertyVampiricRegeneration(5); DelayCommand(2.0,IPSafeAddItemProperty(oArrow,ip,0.0f)); ip = ItemPropertyOnHitProps(IP_CONST_ONHIT_FEAR,IP_CONST_ONHIT_SAVEDC_16,IP_CONST_ONHIT_DURATION_50_PERCENT_2_ROUNDS); DelayCommand(2.1,IPSafeAddItemProperty(oArrow,ip,0.0f)); return; }Thanks for allowing me to think out loud here.