• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community The Community Real Life Discussion Software & Hardware
« Previous 1 … 7 8 9 10 11 … 91 Next »
AutoHotKey question (Non-Freelancer related)

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

AutoHotKey question (Non-Freelancer related)
Offline Trogdor
07-03-2014, 08:08 AM,
#1
Member
Posts: 1,236
Threads: 64
Joined: Feb 2009

Hi,

I was told in the Disco help channel that discussing AHK is OK as long as it does not pertain to Freelancer.

So I just got Deus Ex: Human Revolution Director's Cut. It's a first person shooter where you can aim down weapon sights (ADS). However, the ADS is a toggle, instead of a hold. I want it to be a hold.

I had this same issue with Bioshock Infinite, and I was able to fix it with a simple AutoHotkey script that was basically

Code:
#IfWinActive Bioshock Infinite
$RButton::Send {Rbutton}
$RButton Up::Send {Rbutton}

However, Deus Ex is being a jerk. I keep getting 'stuck' in ADS, and when that happens, my script is then fighting me, with the Rbutton Up call putting me back into ADS after I try to click out of it.

I figured, okay, there must be a time delay for ADS in this game, wherein after you click to go into ADS, any further clicks are ignored until the animation is completed.

And so I set about making my script more complicated, to handle this time-delay.

Code:
#Include Timer.ahk

#IfWinActive Deus Ex: Human Revolution
$RButton::Send {Rbutton}

$RButton Up::
Timer("ADS",500)

if Timer("ADS")
{
Send {Rbutton}
}
Else
{
Sleep Timer("ADS","L")
Send {Rbutton}
Timer("ADS","U")
}
return

I'm using this guy's timer code.

What should happen, is that when the script sees Rbutton Up:: , it checks Timer("ADS"), which returns true or false depending on whether the timer's period is expired. If true, it should immediately Send {Rbutton}. If false, it should get the remaining time Timer("ADS","L") and sleep for that duration, and then Send Rbutton.

..And it works... sometimes. I can confirm that it does sometimes do what it's supposed to, because to test it, I set the duration to like 4 seconds, and sure enough, after I clicked into ADS and took my hand off the mouse, it would exit ADS 4 seconds later.

But it's like the game is sometimes ignoring my clicks, because I'm still sometimes getting stuck in ADS. Sometimes it enters when I click but doesn't leave, like the game ignored the second Rbutton from the script. Other times, it ignores the first click, and enters ADS when it sees the Rbutton Up. It's, like, 50/50 that it'll either work like it's supposed to, or get stuck.

Any suggestions?

At this point, I'm suspecting that it's a problem with the game.

[Image: i4h0ll.gif]
[Image: zonerzonerzoner.gif]
Reply  


Messages In This Thread
AutoHotKey question (Non-Freelancer related) - by Trogdor - 07-03-2014, 08:08 AM
RE: AutoHotKey question (Non-Freelancer related) - by Zen_Mechanics - 07-22-2014, 10:48 AM
RE: AutoHotKey question (Non-Freelancer related) - by utrack - 07-22-2014, 12:36 PM
RE: AutoHotKey question (Non-Freelancer related) - by Trogdor - 07-22-2014, 09:06 PM
RE: AutoHotKey question (Non-Freelancer related) - by Syrus - 08-01-2014, 02:17 PM

  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2025 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode