Author Topic: Sword Help.  (Read 523 times)

This topic will be for all thing revolving around a sword type weapon.

The default animations when you swing a sword do not show up in my Mace weapon. All I did was ctrl h and replace sword with mace for now.

How do you cloak hand when you wield the sword but uncloak when you remove the sword?
« Last Edit: June 13, 2009, 03:58:03 PM by heedicalking »

The default animations when you swing a sword do not show up in my Mace weapon. All I did was ctrl h and replace sword with mace for now.
Make sure the names match up EXACTLY.
That's all I got.

The default animations when you swing a sword do not show up in my Mace weapon. All I did was ctrl h and replace sword with mace for now.
Look through the code and make sure everything is right.

I am talking about the first person hand swing. It is the default animation thay play when you swing a sword. It doesn't play in first person but it plays in 3rd.

Ok, new question. How do you cloak hand when you wield the sword but uncloak when you remove the sword?

Function::onMount
hidenode("RHand");

Function::OnUnmount
unhidenode("Rhand");

I don't know how to activate it. Where do I put it and how do I activate it. I did this and failed. I know, I suck at Torquescript.

Edit:I tried this but it says Unabled to find function hidenode.

Code: [Select]
   // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.5;
stateTransitionOnTimeout[0]      = "Ready";
stateSound[0]                    = TwohandedDrawSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "PreFire";
stateAllowImageChange[1]         = true;

stateName[2] = "PreFire";
stateScript[2]                  = "onPreFire";
stateAllowImageChange[2]        = false;
stateTimeoutValue[2]            = 0.3;
stateTransitionOnTimeout[2]     = "Fire";

stateName[3]                    = "Fire";
stateTransitionOnTimeout[3]     = "CheckFire";
stateTimeoutValue[3]            = 0.6;
stateFire[3]                    = true;
stateAllowImageChange[3]        = false;
stateSequence[3]                = "Slash";
stateScript[3]                  = "onFire";
stateWaitForTimeout[3] = true;

stateName[4] = "CheckFire";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";


stateName[5]                    = "StopFire";
stateTransitionOnTimeout[5]     = "Ready";
stateTimeoutValue[5]            = 0.2;
stateAllowImageChange[5]        = false;
stateWaitForTimeout[5] = true;
stateSequence[5]                = "StopFire";
stateScript[5]                  = "onStopFire";


};

function TwohandedImage::onMount(%this, %obj, %slot)
{
hidenode("RHand");
}
« Last Edit: June 13, 2009, 10:02:23 PM by heedicalking »

Woops i left out a lot :P
Code: [Select]
function NAMEImage::onMount(%this, %obj, %slot)
{
%obj.hideNode(rhand);
%obj.hideNode(rhook);
}

function NAMEImage::onUnmount(%this, %obj, %slot)
{
%obj.unhideNode(rhook);
%obj.unhideNode(Rhand);
}
If you dont want a hook and a hand on delete the HideNode(RHook);