Page 1 of 1

Aim and Fire in FPS game

Posted: Mon Sep 07, 2015 10:50 am
by Xcessity
Here is a macro that will hold down the right mouse button (RMB), wait for 200ms and then hold down the left mouse button (LMB). Usually the RMB is used to aim down sights in an FPS and the LMB fires the weapon.

Code: Select all

	<MACRO id="AimAndFire">
		<START>
			<MOUSEBUTTONINPUT button="RIGHT" behaviour="PRESS"/>
		</START>
		<MAIN>
			<WAIT time="200"/>
			<MOUSEBUTTONINPUT button="LEFT" behaviour="PRESS"/>
		</MAIN>
		<END>
			<MOUSEBUTTONINPUT button="LEFT" behaviour="RELEASE"/>
			<MOUSEBUTTONINPUT button="RIGHT" behaviour="RELEASE"/>
		</END>
	</MACRO>