Author Topic: Problems with onFire  (Read 326 times)

RESOLVED

I've had this problem, not exactly sure what is wrong
Whenever I fire the item, the console echoes "Unknown command onFire" even though I did everything exactly like other mods
Pertinent code:
Code: [Select]
datablock ShapeBaseImageData(MyGunImage)
{
        //Code

stateName[2]                     = "Fire";
stateTransitionOnTimeout[2]      = "Reload";
stateTimeoutValue[2]             = 0.14;
stateFire[2]                     = true;
stateAllowImageChange[2]         = false;
stateSequence[2]                 = "Fire";
stateScript[2]                   = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = "";
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = "";

        //More code
}

function MyGunImage::onFire(%this,%obj,%slot)
{
    //Code
}

moved this out of general modification section because of so few views.
« Last Edit: July 01, 2012, 09:32:45 AM by Treynolds416 »

Is the onFire function still called? What is the code inside your onFire function? You're giving us too little info.


So... no, it's never called