(I'm inexperienced with Torque, or with any language in that case.)
Okay so in reply to
this topic, I attempted to create an akimbo weapon in which the player holds the
SMG in the right hand (normal) and fires using the left mouse button (normal) but
Kaje's Double Barrel Shotgun in the left hand using the right mouse button to fire normally (load -> shoot -> repeat).
I tried to accomplish this via this strategy:
package AkimboSMGLupara
{
function Armor::onTrigger(%this, %player, %slot, %val)
{
%obj.setImageTrigger(1,1);
}
};
ActivatePackage(AkimboSMGLupara);
This doesn't work. I tried the approach by ripping code and combining it to produce armor::onTrigger, typical for secondary fire weapons, and "obj.setImageTrigger" from Guns_Akimbo. What am I doing wrong? Or is it that what I'm trying to do is completely wrong?
The left-handed DB Shotgun image is mounted correctly and everything.
The gun's .cs is provided as an attachment.
Thank you.