One key, two alternating funtions Topic is solved

Ask gaming related questions
El Destroyer

One key, two alternating funtions  Topic is solved

18 Jul 2018, 09:03

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.
User avatar
TLM
Posts: 1339
Joined: 01 Oct 2013, 07:52

Re: One key, two alternating funtions

18 Jul 2018, 10:44

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
Rohwedder
Posts: 1508
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: One key, two alternating funtions

20 Jul 2018, 02:19

Hallo,
or shorter:

Code: Select all

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

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 20 guests