Author Topic: Can someone tell me how to make something akimbo?  (Read 1601 times)

I was gonna try and make Swords Akimbo, and I was wondering how to... well... make it Akimbo.
Do you have to add something to the script?

You make 2 ImageDatablocks for the model (Can just be the same .dts)
Then add one of these:

Code: [Select]
mountPoint = 0; //Right hand
mountPoint = 1; //Left hand

And you need some code to make both weapons show: (Replace Rightimage and Leftimage with the datablock name..)

Code: [Select]
function Rightimage::SecondFire(%this,%obj,%slot)
{
   %obj.setImageTrigger(1,1); //This makes you fire the image in your left hand
}

function Rightimage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot); //Calls the usual onMount function
      %obj.mountImage(Leftimage, 1); //And mounts the left gun
      %obj.playThread(0, armreadyboth); //Raises both arms
}

function Rightimage::onUnMount(%this, %obj, %slot)
{
   Parent::OnUnMount(%this, %obj, %slot); //Calls the usual onUnMount
      %obj.unMountImage(1); //Removes the image in the left hand (Leftimage)
      %obj.playThread(0, root); //Plays normal standing animation
}

Credits to Amadé
« Last Edit: May 26, 2010, 07:24:50 AM by goz3rr »

What would I add to the script, if I wanted to make dual swords?

I told you, You create 2 datablocks, One for each sword,
Then add one of these:
Code: [Select]
mountPoint = 0; //Right hand
mountPoint = 1; //Left hand

Then add this to your script, Replacing Rightimage and Leftimage
Code: [Select]
function Rightimage::SecondFire(%this,%obj,%slot)
{
   %obj.setImageTrigger(1,1); //This makes you fire the image in your left hand
}

function Rightimage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot); //Calls the usual onMount function
      %obj.mountImage(Leftimage, 1); //And mounts the left gun
      %obj.playThread(0, armreadyboth); //Raises both arms
}

function Rightimage::onUnMount(%this, %obj, %slot)
{
   Parent::OnUnMount(%this, %obj, %slot); //Calls the usual onUnMount
      %obj.unMountImage(1); //Removes the image in the left hand (Leftimage)
      %obj.playThread(0, root); //Plays normal standing animation
}

I told you, You create 2 datablocks, One for each sword,
Then add one of these:
Code: [Select]
mountPoint = 0; //Right hand
mountPoint = 1; //Left hand

Then add this to your script, Replacing Rightimage and Leftimage
Code: [Select]
function Rightimage::SecondFire(%this,%obj,%slot)
{
   %obj.setImageTrigger(1,1); //This makes you fire the image in your left hand
}

function Rightimage::onMount(%this, %obj, %slot)
{
   Parent::onMount(%this, %obj, %slot); //Calls the usual onMount function
      %obj.mountImage(Leftimage, 1); //And mounts the left gun
      %obj.playThread(0, armreadyboth); //Raises both arms
}

function Rightimage::onUnMount(%this, %obj, %slot)
{
   Parent::OnUnMount(%this, %obj, %slot); //Calls the usual onUnMount
      %obj.unMountImage(1); //Removes the image in the left hand (Leftimage)
      %obj.playThread(0, root); //Plays normal standing animation
}
Can you please show me the whole code, with the weapon called "DualSwords"?
I dont know how to create datablocks...

Send me your script.

Okay, but its just an edit of the sword script.

I'm cycling between school (Sport stuff) and home :P

I'll just add the code for you, Watch out for the PM.

Oh and change the Shapefile (DualSwords.dts) to the normal sword dts.

Do I need 2 sword.dts's in the folder?


No need to even have a sword.dts in the folder. Just make the model selection grab it from your default sword folder.

No need to even have a sword.dts in the folder. Just make the model selection grab it from your default sword folder.
To do that put Weapon_Sword/Sword.dts where the shapefile datablock should be.

You could, like, forcerequiredaddon for the sword.

Then get the .dts from that.

else

Set the UI name "" (I don't know if that's an acceptable compromise, but meh.)

1.Copy the gun akimbo folder to my documents
2.Edit stuff
3.move to add-ons folder with different name
4.????
5.$profit$