I was looking at having the PC equip a hammer and when using a forge do the looping animation ANIMATION_LOOPING_FORGE01, but I also wanted to have them have a "hammer" in their right hand.
I noticed there are "Base Item" types that seem like they're meant to for things you hold during certain animations, like Stein, Spoon, Rake, Shovel, and so on.
I saw Smithyhammer and figured this was what I wanted, and I made one and forced PC to equip it, but received an error (in game chat window, not script compile)
"You are too small to equip this item" which was weird.
If I want to have a visual hammer appear in PC's right hand and loop them through pounding on a table during their crafting "conversation", am I going about this the right way?
here's fragment of what I put in the On Used of the smithing table. Animation part works, but no hammer in right hand.
One other thing, even though I set duration for 30 seconds, he stops doing the animation after one loop through it. Am I doing the assign incorrectly?
void main()
{
object oPC = GetLastUsedBy();
object oHammer;
if (GetIsPC(oPC) == TRUE)
{
oHammer = CreateItemOnObject("axh_smithhammer",oPC,1);
AssignCommand(oPC, ActionEquipItem(oHammer,INVENTORY_SLOT_RIGHTHAND));
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_FORGE01,1.0,30.0));
}
}





Retour en haut






