Game Development Community

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:

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?

#1
03/21/2006 (7:22 pm)
It doesn't say this in the resource but in the comments it says to also add moveMap.binds in ~client/config.
The resource didn't work for me till I did this. Perhaps this is your problem too.
#2
03/22/2006 (6:23 am)
Hmm... I'll try that. Thanks.