I am trying to get a player to play an animation, then unequip a weapon, in that exact order. This should be easy, but no matter what I try, the animation never plays and the weapon is instantly unequipped. I have tried everything I can think of, and nothing has worked. Here is my latest attempt this script is called on the player from another script:
void main()
{
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF);
ActionPlayAnimation(ANIMATION_LOOPING_GUITARPLAY, 1.0f, 3.0f);
ActionUnequipItem(oWeapon);
}
According to everything I have found on the internet so far this should work, but it doesn't. I have tried all the various action functions, I have tried wrappers, I have tried delaying the unequip, nothing works, and I am at my wit's end. Can anyone provide me with a script that works properly or point out what is wrong?
Thanks!
Matt





Retour en haut






