Game Development Community

Player not firing

by Caleb · in Technical Issues · 12/22/2006 (6:33 am) · 1 replies

Whenever I load my game, my player no longer uses his weapon. It doesn't matter if its a sword, crossbow or fireball, he won't fire. I don't know were all the firing is done in code, so I might of clanged something without knowing it.

As far as I know, the only places in script that anything to do with firing is in the default.bind.cs and my weapon file. All the code is as follows:

In default.bind, there is,
---
function mouseFire(%val)
{
$mvTriggerCount0++;
}
and
moveMap.bind( mouse, button0, mouseFire );
---
I assume this calls the fire code in the engine.

Then I have in my weapon file,
---
..................
stateScript[3] = "onFire";
..................
and for the sword,
---
function SwordImage::onFire(%this, %obj, %slot)
{
// default hand to hand weapon code
WeaponImage::onFireHandToHand(%this, %obj, %slot);

return;
}

I have no idea were I might have gone wrong, so any suggestions would be great.
Thanks.

#1
12/22/2006 (10:40 am)
First I would like to say how stupid I feel right now. If anyone wants to point and laugh you welcome to do so.

After some intense searching, I found that my only problem was......... my weapons were mounted in the wrong slot. :(