Double tap and hold.

GPC2 script programming for Titan Two. Code examples, questions, requests.

Double tap and hold.

Postby xbbb » Thu Feb 18, 2021 11:13 pm

Hello I'm new to GPC2 scripting and to this forum, but I have some programming skills.

I'm trying to achieve the following scenario:

if I press and hold the Melee button
__ the combo TurboMelee have to be executed continuously until I release the button

if I double tap the button and keep it holding (basically press->release->press and hold)
__ the script presses the Sprint button and the Melee button simultaneously and holds them as long as I keep pressing the Melee button (it's for BF5 bayonet charge)

The first part is simple, but with the second part I have troubles not to get into conflict with the first one. The endless loop of the Main function, that's what makes it hard for me.

Could someone help me with the solution for the second part?
Thanks in advance.
User avatar
xbbb
Private First Class
Private First Class
 
Posts: 2
Joined: Thu Feb 18, 2021 10:41 pm

Re: Double tap and hold.

Postby Mad » Tue Feb 23, 2021 9:20 am

Hi, Check out this script and see if it is what you need: viewtopic.php?f=26&t=16623&p=104839
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Double tap and hold.

Postby xbbb » Fri Feb 26, 2021 11:31 pm

Thanks Mad! That helps a lot.
User avatar
xbbb
Private First Class
Private First Class
 
Posts: 2
Joined: Thu Feb 18, 2021 10:41 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: midg3t2 and 153 guests