View Single Post
Old 02-17-2010, 07:10 PM   #34
acdcfanbill
..the wonders I have seen
 
acdcfanbill's Avatar
 
Status: Super Moderator
Join Date: Jun 2001
Location: Random Hell Wholes around the
Posts: 5,700
Imperialist Meatbags Guild Member The Walking Carpets Guild Member LFN Staff Member 10 year veteran! 
perhaps if I explained it in a different way.

imagine this is the first state

mouse1 is bound to +attack
X is bound to "bind mouse1 +altattack"

this means, pressing x will change mouse1 to be +altattack, so then we would have

mouse1 is bound to +altattack
X is bound to "bind mouse1 +altattack"

Now we are stuck on +altattack because X is still "bind mouse1 +altattack"

So we need to change it so that when mouse1 gets bound to +altattack, X changes around so that what it does is bind mouse1 to just +attack

This is why you need set the togglefire variable string in the primfire and secfire variable strings.

Then it works like this

mouse1 is bound to +attack
X is bound to "bind mouse1 to +altattack AND change X to "bind mouse1 to +attack""

so then you hit X and it ends up like this

mouse1 is bound to +altattack
X is bound to "bind mouse1 to +attack AND change X to "bind mouse1 to +altattack""

and you've got your cycle/toggle

acdcfanbill is offline   you may: quote & reply,