Page 1 of 1

One key, two alternating funtions  Topic is solved

Posted: 18 Jul 2018, 09:03
by El Destroyer
Hello everybody,
Im wondering how to solve my fornite problem, to change quickly between 2 weapons. The quickest way would be with only one key, like in CSGO with Q.
I would like one key to have alternante outputs, for example 1 and 2. So when I press the key E, the output is 1 and when I press again E the next output is 2, and loops.

Thanks.

Re: One key, two alternating funtions

Posted: 18 Jul 2018, 10:44
by TLM
long form toggle:

Code: Select all

e::
if ( !i )
{
	send 1
	i := 1
}
else
{
	send 2
	i := 0
}
return
short form

Code: Select all

e::send % ( i:=!i ) ? 1 : 2

Re: One key, two alternating funtions

Posted: 20 Jul 2018, 02:19
by Rohwedder
Hallo,
or shorter:

Code: Select all

e::send % 1+!i:=!i