Author Topic: Mounting and unmounting an image through weapon states  (Read 616 times)

Code: [Select]
stateName[0]                    = "Activate";
stateTimeoutValue[0]            = 0.15;
stateTransitionOnTimeout[0]     = "Ready";
stateSound[0] = weaponSwitchSound;

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

stateName[2]                    = "Fire";
stateTransitionOnTriggerUp[2]   = "StopFire";
stateTransitionOnTimeout[2]     = "Fire";
stateTimeoutValue[2] = 0.005;
stateWaitForTimeout[2] = true;
stateFire[2]                    = true;
stateAllowImageChange[2]        = true;
stateSound[2] = ApCaFireSound;
stateScript[2]                  = "onFire";

stateName[3]    = "StopFire";
stateTransitionOnTimeout[3]    = "Ready";
stateTimeoutValue[3]               = 0.05;
stateWaitForTimeout[3]    = true;
stateAllowImageChange[3]    = true;
stateScript[3]                     = "onStopFire";
};

//Beam Functions
//
//function ApCaImage::onFire(%this,%obj,%slot)
//{
// Stuff goes here for mounting ApolloCannonBEAM.dts to
// the muzzle point of ApolloCannonBASE.dts.  The back end
// of the beam needs to be mounted to the muzzle.
//}
//
//function ApCaImage::onStopFire(%this,%obj,%slot)
//{
// This unmounts the beam image
//}
//

What I want to know is what I need to put in the functions, as I have no idea how to do this.  If I were to guess, it would be something like:

Code: [Select]
%obj.MountImage(BeamImage);
Also, if there is a more efficient way, please let me know.
« Last Edit: December 26, 2013, 05:26:58 PM by SWAT One »

%obj.mountImage(image,slot);

In your image data too, make sure you tell it where to mount the image using mountPoint.

Okay, great.

Where do I specify that I want to mount the beam image?
« Last Edit: December 27, 2013, 01:20:16 AM by SWAT One »

Slots 2 and 1 both mount to my player's hand.

Also, what's the unmount script?

%obj.unmountImage(slot);