Grenade help
by Ironbelly Studios · in General Discussion · 09/01/2008 (2:52 am) · 1 replies
I have grenade resource , but player first bites the pin out and then throw the grenade.Currently player just throw the grenade and this become explodes.What i should to do for bites the pin out.?????
About the author
Torque Owner Ironbelly Studios
1. in default.bind.cs i added
moveMap.bindCmd(mouse, "button0","commandToServer(\'Crossbowdrop\',\"Crossbow\");", "");
2. In inventory.cs i added this function
function serverCmdCrossbowdrop(%client,%data)
{
%client.getControlObject().throw(%data);
}
3. but in inventory.cs file in the function
function ShapeBase::throw(%this,%data,%amount)
{
// Throw objects from inventory. The onThrow method is
// responsible for decrementing the inventory.
if (%this.getInventory(%data) > 0) {
%obj = %data.onThrow(%this,%amount); ////////// The object is not creating /////
if (%obj) {
%this.throwObject(%obj);
return true;
}
}
return false;
}
%obj did not create.Thats why some other function is not performing.
But when i am doing it by keyboard binding this is happening well.
What is the problem...