Something weird
by Nathan · in General Discussion · 03/21/2006 (6:55 pm) · 2 replies
Ok, this is just weird... I just added this resource:[url] http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5907[/url]. This is where it gets weird, I added this code:
But when I press "m" nothing happens? I added the echo to see if the function was getting called and it wasn't? I then entered "nextweapon();" in the console and got the "NextWeapon Called" echo. But in the function
ShapeBase::cycleWeapon, I added "echo("CycleWeapon called");". and when I entered "nextweapon();" in the console I never got the echo? Why aren't the functions executing?
function nextWeapon( %val )
{
echo("NextWeapon Called");
if ( %val )
commandToServer( 'cycleWeapon', "next" );
}
moveMap.bind(keyboard, "m", nextWeapon );But when I press "m" nothing happens? I added the echo to see if the function was getting called and it wasn't? I then entered "nextweapon();" in the console and got the "NextWeapon Called" echo. But in the function
ShapeBase::cycleWeapon, I added "echo("CycleWeapon called");". and when I entered "nextweapon();" in the console I never got the echo? Why aren't the functions executing?
Torque Owner Richard Pettyjohn
The resource didn't work for me till I did this. Perhaps this is your problem too.